how do i add global variable only once every trigger ?

Get help using Construct 2

Post » Fri Jan 13, 2017 8:40 am

Message: giffary19 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
so the story is, i have a globalvariable "MISSIONCOMPLETE" with the initial value is 0.
if the MISSIONCOMPLETE value is 3, then the player can go to the next stage

to add the value:
1. player must overlap the object
2. player must touch the object

so the question is:
1. how do i add the value only once every trigger ? i mean if the player overlap the object more than one time, MISSIONCOMPLETE just add 1 value (without destroy the object)
2. how do i add the value only once every i touch the object ? i mean if player touch the object more than one time,
MIISIONCOMPLETE just add 1 value (without destroy the object)

https://www.dropbox.com/s/5hn9ctiyamnfw0x/tanya.PNG?dl=0
please help :roll:, thanks before
Last edited by giffary19 on Fri Jan 13, 2017 8:50 am, edited 1 time in total.
B
8
Posts: 9
Reputation: 318

Post » Fri Jan 13, 2017 8:48 am

if you are using is overlaping object and the object doesnt move anymore you can add under it another condition trigger once.

however, if you move the same object that is overlapping even for 1 px the overlapping condition is going to trigger again. since will count as a new event happening overlapping at a different position.

for object value when touched. use condition on touched object or tapped object. both trigger one time. then in action tab near the condition for both the above and touch conditions use add value to your global variable.

read this also - Holy Bible of C2

look at examples and search for data inputted - Holy section for beginners.


edited reason: miss typing.
B
75
S
22
G
68
Posts: 1,336
Reputation: 43,269

Post » Fri Jan 13, 2017 8:55 am

@gamecorpstudio i already add condition trigger once
B
8
Posts: 9
Reputation: 318


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests