123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|642|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> Another type like question

Thu, 10 Apr 2008, 11:32
Orion Pax
Ok. I have several different types of types in my game....HEHE. I have one for players...lasers....stars...planets....asteroids...and probably many more. My question, Is there a way to determine if a pickedentity() from camerapick command is part of one of those TYPES with out iterating through them? I just need to know if it belongs to my PLAYERTYPE or PLANETTYPE or ASTEROIDTYPE. Not specifically which one, just need to know what group.
Thu, 10 Apr 2008, 13:02
Forklift_Fred
How about EntityName()?

When you assign an entity to a PLAYERTYPE for example, use

NameEntity(entity,"PLAYER")

then when you have picked it, use something like

If EntityName(PickedEntity()) = "PLAYER" etc

to check through the different types of types rather than go through all the individual entities.

Not sure if you can use the same name twice or not but you'd only need a global entity counter to append a number to the name and just check the first 6 characters for example...

Just a thought. May not be the best solution but it sounds plausible


Another thought would be to use EntityType() and GetEntityType() but if you are using collissions it might complicate matters there.

-=-=-
Come rain or shine...
Thu, 10 Apr 2008, 13:32
Orion Pax
WOoohooo...it worked....nameentity that is. It will reuse the same name over and over. Thanks for the help!
Thu, 10 Apr 2008, 14:22
Orion Pax
Eh that wont work. For some reason its not giving me the name of the PICKEDENTITY() with entityname(). Apparently its 2 separate entities.....or something...either way its not working...looks like I will have to iterate through the types.
Thu, 10 Apr 2008, 15:55
Forklift_Fred
Hmmm... I've played with the example for PickedEntity() and it is doing what I expected... Quite simply in this case it's turning the alpha down to 0.5

Obviously you'll need to change the textures to an image you have...



-=-=-
Come rain or shine...
Sun, 13 Apr 2008, 14:18
Orion Pax
Another question about types....I konw that you can quickly save the data in types to a file with STR$(TYPENAME). Is there a quick and dirty way to transfer that info (Eg [2,3,4,D,0] ) into another type? Like transfering data over the internet and putting it into your types automatically?

If not then I will have to iterate through each and look for comma's and brackets.....