Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,586 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Collision with entity, platform or enemy? #300343
12/01/09 16:36
12/01/09 16:36
Joined: Dec 2009
Posts: 8
S
Spkka Offline OP
Newbie
Spkka  Offline OP
Newbie
S

Joined: Dec 2009
Posts: 8
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/09 17:57
12/01/09 17:57
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
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/09 20:54
12/01/09 20:54
Joined: Dec 2009
Posts: 8
S
Spkka Offline OP
Newbie
Spkka  Offline OP
Newbie
S

Joined: Dec 2009
Posts: 8
Thank you

Re: Collision with entity, platform or enemy? [Re: Spkka] #300380
12/01/09 21:21
12/01/09 21:21
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
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

Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1