playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Store Trigger Count
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Store Trigger Count (Read 3193 times)
ben135
Playmaker Newbie
Posts: 14
Store Trigger Count
«
on:
April 01, 2014, 01:56:31 PM »
Is there a way to store the number of times the trigger is activated on a specific gameobject into a variable?
«
Last Edit: April 02, 2014, 02:52:06 PM by ben135
»
Logged
sebaslive
Hero Member
Posts: 572
Re: Store Trigger Count
«
Reply #1 on:
April 01, 2014, 02:15:07 PM »
You can send event to a new state with a float add, or float multiple add action that you can set to add 1.
You can then set a next frame event back to the trigger so that every time it is entered it adds 1 and goes back til it's triggered again.
Logged
All my VR games use Steam VR Playmaker Toolkit:
http://u3d.as/u20
And Oculus Touch Playmaker Toolkit:
http://u3d.as/QT5
Follow me @sebasRez
ben135
Playmaker Newbie
Posts: 14
Re: Store Trigger Count [SOLVED]
«
Reply #2 on:
April 02, 2014, 02:51:54 PM »
My global variable of the triggercount seems to be storing values it gets from the previous runtime (after on/off). Is there a way to reset global variables to its initial value?
Logged
sebaslive
Hero Member
Posts: 572
Re: Store Trigger Count
«
Reply #3 on:
April 02, 2014, 04:19:25 PM »
You can make an fsm that sets the value to 0 in a start state.
Logged
All my VR games use Steam VR Playmaker Toolkit:
http://u3d.as/u20
And Oculus Touch Playmaker Toolkit:
http://u3d.as/QT5
Follow me @sebasRez
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: Store Trigger Count
«
Reply #4 on:
April 03, 2014, 08:28:16 AM »
Hi,
you are experiencing a bug, so yes, I would simply force the global variable value to 0 when the game starts.
bye,
Jean
Logged
ben135
Playmaker Newbie
Posts: 14
Re: Store Trigger Count
«
Reply #5 on:
April 09, 2014, 04:05:12 PM »
I tried setting up a state with the action "set float value" pointed to the global variable inside an empty game object in the start state. The action doesn't' get initiated. How can I fix that?
Logged
sebaslive
Hero Member
Posts: 572
Re: Store Trigger Count
«
Reply #6 on:
April 09, 2014, 04:21:04 PM »
Does it give an error, and if so, what does it say?
Logged
All my VR games use Steam VR Playmaker Toolkit:
http://u3d.as/u20
And Oculus Touch Playmaker Toolkit:
http://u3d.as/QT5
Follow me @sebasRez
ben135
Playmaker Newbie
Posts: 14
Re: Store Trigger Count
«
Reply #7 on:
April 09, 2014, 08:45:14 PM »
There are no errors. The global variable just doesn't change to 0 when I run it. The action is never used while I watch the game run.
Logged
sebaslive
Hero Member
Posts: 572
Re: Store Trigger Count
«
Reply #8 on:
April 10, 2014, 01:26:15 AM »
Not sure I follow, can you show a screen grab to see how the action is set up?
Logged
All my VR games use Steam VR Playmaker Toolkit:
http://u3d.as/u20
And Oculus Touch Playmaker Toolkit:
http://u3d.as/QT5
Follow me @sebasRez
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Store Trigger Count