Gamestudio Links
Zorro Links
Newest Posts
Tradestation missing in table of contents
by AndrewAMD. 10/23/26 14:35
ZorroGPT
by TipmyPip. 10/23/26 09:08
No connection to MT4
by JeyKey II. 10/22/26 15:33
Zorro tutorial ideas?
by mistery. 10/21/26 05:28
Avoid "log\ - delete old files" message
by Martin_HH. 10/20/26 07:23
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (JeyKey II, TipmyPip, Samed), 11,556 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
JimSimons, julienp, julienper, KelleyAbbey, Yopachi
19246 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