First Run condition
popoption
Member, PRO Posts: 8
Hi all
This is my first post. I have been working with GameSalad converting an old Xcode project. Most everything is done but I thought I would make the game instructions popup on the first run after the splash screen and only on the first run. Can anyone, gently, point me in the right direction to enable this. I'm assuming that I would use tables with a stored value?
Thanks everybody! I've learned so much from all of you!
-edit-
p.s. oops! I just realized this was actually my second post. I posted a question about stereo sound a long time ago but we can treat this as my official first post
This is my first post. I have been working with GameSalad converting an old Xcode project. Most everything is done but I thought I would make the game instructions popup on the first run after the splash screen and only on the first run. Can anyone, gently, point me in the right direction to enable this. I'm assuming that I would use tables with a stored value?
Thanks everybody! I've learned so much from all of you!
-edit-
p.s. oops! I just realized this was actually my second post. I posted a question about stereo sound a long time ago but we can treat this as my official first post
Best Answers
-
SolarPepperStudios Posts: 754Welcome to the GameSalad forums! I tried doing that once and I accomplished it by making a universal attribute (BOOLEAN) and setting it to true. Then if game.firststart is true then spawn actor at: X,Y. Then when they go to the next scene set game.firststart to false and save the attribute with a key (the key used to load the value) and make an actor that at the start of the game (during your intro) loads that key into memory. So to do that use save attribute game.firststart with key firststart and then in your intro actor do load attribute key firststart into game.firststart (your BOOLEAN) Make sense?
-
gyroscope I am here.Posts: 6,598
Hi @popoption You need only one attribute for this (and two behaviours if you want this to happen every time the app is closed and opened again), so a table won't be necessary.
Make a boolean game attribute, let's call it InstFinish, set to false (i.e unchecked)
Put all your instructions popup rules in this rule:
Rule: When InstFinish is false
-----your instruction popup rules
Change attribute InstFinish to true
-------
Now if you wanted this to be "remembered" for whenever the app is closed and opened afterwards, add this behaviour to the Rule above:
Save Attribute InstFinish
--and just before your Change Scene Behaviour on your splash screen, add the behaviour:
Load Attribute InstFinish
PS Welcome to the Forums. :-)
Edit: writing this same time as @Utveckla_Games""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Answers
btw, how long before I get my pro badge? I made a request but I guess that it's all done manually?
Thanks again, awesome help!