Platform Builder Forums
Help and Support => Working with Platform Builder => Topic started by: Antikore on September 11, 2020, 08:39:57 PM
-
Let me explain, I'm trying to do a defend dash system, however, my defend variable stays in 0.
Here are my three command prompts
//Player 1 - Create CP
local var defend = 0
//Player 1 - Looping CP
if defend > 0
defend - 1
if defend > 16
{
color = yellow
effect = diamond out
remove hurt = true
}
else
remove hurt = false
<area name>[defend] //For testing
//Player 1 - Pick Key Press CP
if defend = 0
defend = 32
However, it just does nothing
-
*Bump*
-
Really? Anybody?
-
did you try running two variables?
like 'defend' and 'defend_check'. it might help you out
-
did you try running two variables?
like 'defend' and 'defend_check'. it might help you out
wdym exactly?
-
//Player 1 - Pick Key Press CP
if defend = 0
defend = 32
let's say here, wouldn't this be better if you did something like:
if defend_check = 0
defend = 32
maybe this happens simply because Command Prompt doesn't recognize the variables. I had a problem like that before. try running this code with 'game var's in place
-
let's say here, wouldn't this be better if you did something like:
if defend_check = 0
defend = 32
maybe this happens simply because Command Prompt doesn't recognize the variables. I had a problem like that before. try running this code with 'game var's in place
okay, lets see
-
Fixed: I tested changing the name
Looks like defend or defending doesn't work, but defendStatus and defendingS does
So. Its a bug report now?
EDIT: Nvm, defend and defending are built-in variables. Defend is used for adding defend ability to the player, and defending is to check the player's defending status.