Hey, I got a problem while checking player collision with enemy entities. I also got moving platforms etc which are also entities. I know I can use EVENT_ENTITY, but how can I figure out wether or not the entity is an enemy? The entities are placed in the WED, so not created with ent_create.
Thanks in advance
Re: Collision with entity, platform or enemy?
[Re: Spkka]
#300363 12/01/0917:5712/01/0917:57
Use a skill for that. For example: enemys.skill70 = 1, Platforms = 2, Items = 3 and so on. Now in your event you can read the you.skill70 from the Entity that make the collision with your Player. You can use the following code:
if(!you) {return;} // collision with blocks... switch(you.skill70) { case 1: collision_enemy_func(); break; case 2: collision_platform_func(); break; case 3: collision_item_func(); break; }
Re: Collision with entity, platform or enemy?
[Re: Widi]
#300379 12/01/0920:5412/01/0920:54
Widi's idea is good but you may choose to use a skill number a lot less than 70. It may he helpfult to remind/inform you that only skills 1 through to 20 are available through WED.
So if you choose a skill below 21, you can SET your "enemy-type" skill stright from inside WED, without mucking about in script.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial