How to set a value on "Collide Actor" in a collisi

Non-platform specific questions.

How to set a value on "Collide Actor" in a collisi

Postby fauldran » Tue Apr 11, 2006 12:21 am

I have a scenario where multiple circles move around the screen and collides with squares. Each time one collides with a square I need to update a value (myVar1) on that square.

I have a script setup on the circles to execute when they collide with a square. I can't seem to find a way to reference the square actor from the script. Here is what I tried. Some other functions can reference the collide actor this way. (Visibility State for example.)

Code: Select all
getclone("Collide Actor")->myVar1 += 1;


Anyone know how to do this without using getAllActorInCollision and then searching the returned actors to see if the square is there?

Thanks...
Fauldran
Image
fauldran
 
Posts: 43
Joined: Tue Dec 20, 2005 10:52 am
Score: 0 Give a positive score

Postby makslane » Tue Apr 11, 2006 1:12 am

You must use:

collide.myVar1 += 1;
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby fauldran » Tue Apr 11, 2006 1:27 am

Aahhhh...

I knew the answer would be simple. Thanks!
Fauldran
Image
fauldran
 
Posts: 43
Joined: Tue Dec 20, 2005 10:52 am
Score: 0 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest