Page 1 of 1

Passing Actors to Global Subroutine

PostPosted: Thu Oct 28, 2004 3:41 am
by jazz_e_bob
I have a collision event script.

The script includes Physical Response and some other stuff.

The same code is used in many places.

Can I somehow pass the event and collide actors to a global routine for processing?

( Quick example if possible. :) )

Image

PostPosted: Thu Oct 28, 2004 12:19 pm
by makslane
You can use the actions with "Event Actor" and "Collide Actor" names inside global code.

PostPosted: Thu Oct 28, 2004 7:42 pm
by jazz_e_bob
:)

PostPosted: Tue Jan 18, 2005 12:40 am
by jazz_e_bob
So...

In global code I can use:

Actions with "Event Actor" and "Collide Actor" names.

I can assign and read parameters to and from event and collide actors.

BUT I can't assign and read user vars to and from event and collide actors.

:(

Please tell me this is an easy fix. :) :wink:

Image

I still think it might be nice to be able to pass actors to global code...

GE RULES!

PostPosted: Tue Jan 18, 2005 6:21 pm
by makslane
If you have an actor variable lives, for example, in your global code you can use like other variable in Script Editor:

lives = lives + 1;

Will update the Event Actor lives var.

collide.lives = collide.lives + 1;

Will update de Collide Actor lives var.

PostPosted: Tue Jan 18, 2005 9:31 pm
by jazz_e_bob
:oops:

I thought I tested this and it didn't work.

It does work!

Sorry to trouble you!

Image