I am setting the 8 direction movement values via a variable and I set them when the player is created. Same for the enemy movement. It all works well until the player is killed, and restarts the layout. None of the 8 direction values are restarted with the layout restart. How would I go about adding the variables to the instances again? Thanks!
Develop games in your browser. Powerful, performant & highly capable.
Anyone?
Set it to On start of layout? Not sure what are you doing there exactly. Some screenshot or capx would clear the things out.
On start of layout create player ... Should give you your basic player information ...
Hmm, nope create player at start of layout doesn't work. : /
Here's the capx
htt ps://w w w .dropbox.com/sh/n5c5exiggbo6z6i/AAAhYvAa_geOPH_Mr7SCAJz2a?dl=0
In your capx Change "On Created" to "On Start of Layout"
Then add the action
System | Set PlayerHP 3
Seems when you killed the player, you were not resetting the global variable "PlayerHP" back to 3
Ah yep, that nailed it. I overlooked that. Thank you facecjf. I really appreciate it!
No problem! Good luck.