private variable problem

For questions about using Classic.

Post » Fri Dec 03, 2010 8:12 pm

hi im tring to make that :

allways : set text "money:" & Global('Money')

if "sprite" is overlapping "sprite2" then add 5 to Globalvariable money
and destroy sprite2

but something wont work !

can u help me

i just want that if a player go over a sprite (money) he gets it and the text says "money : "5""
B
1
G
2
Posts: 2
Reputation: 629

Post » Fri Dec 03, 2010 10:03 pm

Use 'on collision' instead of overlapping.


So
sprite1 on collision with sprite2 - add 5 to globalvariable
-destroy sprite2


Might need to put the always above or below the collision event to make it work, try both.

Always - set text to "globalvariable'
B
9
S
2
G
4
Posts: 346
Reputation: 2,726

Post » Fri Dec 03, 2010 10:20 pm

Moved thread from Discussion. Please be mindful of posting your topics in the proper forum.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests