Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Akow), 1,359 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Please Help! - Problem with Event (Collision) #162880
10/23/07 04:01
10/23/07 04:01
Joined: Jan 2005
Posts: 605
Deutschland, NRW
G
garv3 Offline OP
User
garv3  Offline OP
User
G

Joined: Jan 2005
Posts: 605
Deutschland, NRW
Hi,

i've got an entity to which I assigned this action (collect_ball):
Code:
function collected(){
if (event_type == EVENT_PUSH){
tocollect -= 1;
ent_remove(me);
}
}

action collect_ball(){
my.transparent = ON;
my.shadow = ON;
my.alpha = 50;
my.push = 1;
my.ENABLE_PUSH = ON;
my.event = collected;
}



When I hit it with the player entity (push = 100) it should disappear. But this does not work. The event function is not called.
Any idea?
Thx!


GameStudio Version: A7 Pro v7.86
Re: Problem with Event [Re: garv3] #162881
10/23/07 13:34
10/23/07 13:34
Joined: Jan 2005
Posts: 605
Deutschland, NRW
G
garv3 Offline OP
User
garv3  Offline OP
User
G

Joined: Jan 2005
Posts: 605
Deutschland, NRW
Forgot to mention that the player entity is moved using phent_addtorqueglobal and not by c_move!


GameStudio Version: A7 Pro v7.86
Re: Problem with Event [Re: garv3] #162882
10/23/07 15:31
10/23/07 15:31
Joined: Jan 2005
Posts: 605
Deutschland, NRW
G
garv3 Offline OP
User
garv3  Offline OP
User
G

Joined: Jan 2005
Posts: 605
Deutschland, NRW
Hmm,

with my.ENABLE_IMPACT = ON; it works. That's strange because the player entity's push value is set to 100! So the impact event should not be triggered on collision or am I getting something wrong?
As I understand the event handler, the push event should be triggered, right?

Please help me! I'm stuck!


GameStudio Version: A7 Pro v7.86
Re: Problem with Event [Re: garv3] #162883
10/24/07 00:25
10/24/07 00:25
Joined: Apr 2007
Posts: 67
suriname0 Offline
Junior Member
suriname0  Offline
Junior Member

Joined: Apr 2007
Posts: 67
Well, I'm no expert, but I think ENABLE_impact is for all collisions, even event_push. I think the player's push value is entirely disregarded if the player isn't allowed to collide with anything.


If I am posting, it probably means I am asking a question. Or faking my knowledge by agreeing with somebody else.

Gamestudio download | chip programmers | 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