1 registered members (TipmyPip),
18,449
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: collision_event
[Re: dracula]
#248729
01/28/09 19:57
01/28/09 19:57
|
Joined: May 2008
Posts: 331 Lithuania, Vilnius
Jaxas
OP
Senior Member
|
OP
Senior Member
Joined: May 2008
Posts: 331
Lithuania, Vilnius
|
function test_event() { if(event_type == EVENT_BLOCK) sys_exit("bye bye ..."); } action test_action() { my.emask |= EVENT_BLOCK; my.event = test_event; while(1) { c_move(my_model,vector(10,0,0),nullvector,GLIDE); wait(1); } } Check manuel,all truth in there 
The smaller the bug, the harder it is to kill. _________________________________________ Forklift DEMO (3dgs)
|
|
|
Re: collision_event
[Re: dracula]
#248739
01/28/09 20:56
01/28/09 20:56
|
Joined: May 2008
Posts: 331 Lithuania, Vilnius
Jaxas
OP
Senior Member
|
OP
Senior Member
Joined: May 2008
Posts: 331
Lithuania, Vilnius
|
try this:
function test_event()
{ swit(event_type == EVENT_BLOCK) sys_exit("bye bye ..."); } switch (event_type) { case EVENT_BLOCK: sys_exit("bye bye ..."); return; //try with return and without(just remove this line }
The smaller the bug, the harder it is to kill. _________________________________________ Forklift DEMO (3dgs)
|
|
|
Re: collision_event
[Re: Jaxas]
#248759
01/28/09 22:12
01/28/09 22:12
|
Joined: Oct 2002
Posts: 2,256 Oz
Locoweed
Expert
|
Expert
Joined: Oct 2002
Posts: 2,256
Oz
|
Check manuel,all truth in there Lol, I wouldn't go so far as to say all truth lies within the lovely 3DGS manual, but yes, it usually helps.
Professional A8.30 Spoils of War - East Coast Games
|
|
|
Re: collision_event
[Re: dracula]
#248808
01/29/09 08:33
01/29/09 08:33
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
The line in the test_action should be my.emask |= ENABLE_BLOCK;
And the event function should work fine with function test_event() { if(event_type == EVENT_BLOCK) sys_exit("bye bye ..."); }
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
|