Simple test failing has got me stumped...
gyroscope
I am here.Member, Sous Chef, PRO Posts: 6,598
I'm running through some straightforward tests in the Actor editor; just experimenting really. For this particular test, what I've done in the Rules section seems watertight to me, but doesn't work. I'm at a loss to know why.
I'd want the width of the actor to shrink by 2 pixels each time (how many ticks is the default, I don't know) until it reaches a certain width, then stops. (By the way, I've tried out the timer with it, but that doesn't want to know either). So I've done this:
Can anyone help please?
PS 10 to 1 am here in Kent, UK; torrential rain, lightning and thunder. Exciting stuff!
PPS Actually, just thought: is it because even though the width is getting thinner, GS still knows it at it's original width; so I'd have to update a variable in a new attribute?
I'd want the width of the actor to shrink by 2 pixels each time (how many ticks is the default, I don't know) until it reaches a certain width, then stops. (By the way, I've tried out the timer with it, but that doesn't want to know either). So I've done this:
Can anyone help please?
PS 10 to 1 am here in Kent, UK; torrential rain, lightning and thunder. Exciting stuff!
PPS Actually, just thought: is it because even though the width is getting thinner, GS still knows it at it's original width; so I'd have to update a variable in a new attribute?
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Comments
Edit: ah phooey, that doesn't work either.
Time I was asleep anyhow.
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
A work-around could be:
Timer-For 1 second
-Timer every .05 seconds
--Change attribute self.size.width to self.size.width+5
--Change attribute self.size.height to self.size.height+5
This will cause the actor to grow. In this case, based on the time and addition, it will take 1 second to grow by 100 pixels (.05 x 20 = 1 sec, so adding 5 pixels x 20 = 100 pixels).
You can play with all of the numbers here to make it faster/bigger/smoother. To shrink it, do the same thing only subtract from the width and height.
I would not suggest using this for an iPhone game on more than a couple actors considering timers can be very resource heavy. The iPad seems to work fine with this! Let me know if this is even remotely close you what you are looking for!
-Kyle
***Edit***
Just noticed you were talking about subtracting, so use subtraction instead of addition!
http://gamesalad.com/forums/topic.php?id=7256
My attempt worked as did another member's contribution but both suffered from similar problems: the actor shrinks fine, but enlargement is slow and jerky, nowhere smooth enough. Hence trying to crack the prob another way.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
http://gamesalad.com/game/play/61878
See if this is what your looking for. I'm sure it could be tweaked a bit but it works! Enjoy!
-Kyle
Though the only problem I have is, like all games posted to the GS site that I see, if I click on Download Project, it opens the app in a web page, rather than downloading the project to my desktop. Hmm, intrigued to know how you did that, but don't know how to get the project file to find out.... :-(
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
If all else fails, just email me at kbegemandev (at) gmail dot com and ill email you the project file!
So I'll take up your offer of the project file via email, thanks Kyle.
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
-remember to change the file suffix to .zip so you can get to the file.
Edit: I wonder if it's got something to do with the GameSalad Web Plugin that I downloaded and installed? Can't remember where or find it on the GS website again though, but I do remember it was in beta, so could be having a few bug probs... if I knew where it lived on my computer, I'd delete it to see if that solved the prob...
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Also, just so you know, when you download any project from GS, it will be a .game file. If you double click this, it is chess and will crash. What you have to do every time is just click the file once, then again a second later. It should now be waiting for you to change the name. Move your cursor over the .game, erase it and type .zip and hit enter. A notice will pop up, and you want to click the "Use .zip" button. This will then change the file into a .zip file, so double click that, it will auto unzip and you will then have a project file! It will have a name like "Upload07.gameproj" and you can change the name to anything you want like "Grow/Shrink Lopp Demo.gameproj".
;-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps