Copying an integer?
http_gamesalad
Member Posts: 1,340
I'm trying to copy an integer attribute that I made.
The integer attribute I'm trying to copy is set up like this
Timer every 7 seconds
game.active to Radnom (1,10)
I made another integer attribute that I want to copy game.active & I called it game.CopyActive
Now with my little knowledge lol.. I tried to set it up something like:
Change attribute game.CopyActive to game.Active
& when that didn't work I tried something like
Constrain attribute game.CopyActive to game.Active
That also didn't work..
So can someone please help me with this?
Comments
Create a new, blank scene. Create a new actor. In that actor, add a single behavior without any rules: Change Attribute game.CopyActive to game.Active. Be sure to select both attributes from the drop-down menu and not just type them in.
Add a Display Text with game.CopyActive (again, select it instead of typing it in). Set the color to black.
Drag the actor onto the new scene. Set the value of game.Active to 25.
When you Preview the scene, what value appears on that new actor?
Once you have that working we can build up to what you're trying to do with a timer and random value.
If it "doesn't work" post a link to download your project file.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User