I wish to let a variable 'equal' a sprite entity that is included in a type.
This isn't my exact code, but it's all the relevant stuff:
---------
target_sprite=My_Type/Sprite
---------
Is that the correct syntax?
How can I specify it to be just the first if I have more than one occurence?
(Jst when I thought I was getting to grips with types!)
This isn't my exact code, but it's all the relevant stuff:
Type My_type Field X Field Y Field Z Field Sprite End Type For f=1 to 10 Type_data.My_Type=New My_type Type_data/X=rnd(10,20) Type_data/Y=rnd(10,20) Type_data/Z=rnd(10,20) Type_data/Mesh=LoadSprite("My_Sprite"+f+".png") Next ;Further on in my program, I need to retrieve the FIRST Sprite handle. (The handle of the sprite in the first occurence. I can guarantee there WILL always be a valid entity) target_sprite=My_Type/Sprite
---------
target_sprite=My_Type/Sprite
---------
Is that the correct syntax?
How can I specify it to be just the first if I have more than one occurence?
(Jst when I thought I was getting to grips with types!)