3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: Event on location... only once  (Read 128 times)

« on: April 27, 2014, 04:45:29 AM »
Hi all... I am a begginer and I could ask for help... i create little speed riding game and i have a counter on event on locations as score (griding tops)... but i need event on location activate only once... now it allow reach unlimited score :))

thanks for reply i hope that is a totaly newbie problem...
afraid, that questions about hi-score comes later :)) but i before little study it...

(sorry for my english:)
« Reply #1 on: April 28, 2014, 07:33:07 AM »
i'm sure you're aware that the EOL can be triggered on entry or exit, and this event will only occur once during entering or exiting the volume...  so i'm assuming you want to make sure only the first racer triggers the EOL...

you're gonna need a lil script logic in order to do this...  it's simple

when volume is entered stop the object

the code looks like this

Code: [Select]
void Main()
{
   //    if EOL is obj zero, check to see if trigger is activated and stop the object
   if(IN_0>0)iObjectStop(OBJ_0);

   //   if you wanna restart (by hitting Enter)
   if(iKeyDown(iKeyCode("DIK_RETURN")))iObjectStart(OBJ_0);

}


--Mike
« Reply #2 on: April 29, 2014, 01:05:54 AM »
thank you very much... now its fixed
« Reply #3 on: April 29, 2014, 07:47:07 AM »
you're quite welcome... good luck with your project...

--Mike
Pages: [1]