make actor goes up and down
hello,
i've made an endless game where an actor spawns twice at the same x position but different y position, what i want is to make him goes up and down in a slow speed while he remain the same x position . i've found this formula "Constrain Attribute : self.Position.Y to 25sin(self.Time300)+208" but the problem is that it doesn't work when the actor is spawning, because the position is changing. I don't know if you understand me , but if you do, can you please help.
Thank You.
Comments
The 208 in that expression is the offset. Try replacing that with self.startY and then adding a change attribute behavior to change self.startY to self.position.Y.
What @tatiang said . . . .
. . . .also: 25sin(self.Time300)+208 should read 25 * sin(self.Time * 300)+208
@tatiang
Problem with the new text formatting . . . . . .
Placing an asterix in code (as in >> self dot time asterix three hundred) results in the asterix being wrongly removed (presumably as it's seen as an unclosed formatting tag ?).
Not great for communicating GameSalad code !
Works perfectly , thank you
@Socks
There are a bunch of changes to the forum text editor. For example, typing in a username after '@' no longer notifies that person unless you select their name from a drop-down menu of auto-complete choices. And as I'm sure you noticed, quotes no longer use the 'blockquote' tag but instead just a single greater than sign. Option/alt+space doesn't work for indenting text, which was my all-time favorite trick.
Time for me to make a quick primer for everyone!
I think the new formatting is great - even though I don't know my way around it yet - but it seems much more simple.