EventDisable("Event Actor", EVENTALL);
EventEnable("Event Actor", EVENTANIMATIONFINISH);
ChangeAnimation("Event Actor", "dying", FORWARD);
DestroyActor("Event Actor");
credit++;
if(credit>=1)
{
credit-1;
//start the game
}
//this next part can be skipped if you don't want to run any code if the player does not have enough credits
else if(credit==0)
{
//the code you want to execute if the player does not have enough credits
}
credits.textNumber=credit;
credit - 1;
credit -= 1;
MrJolteon wrote:First, declare a variable called "credit".
Then, on key down -> space, put
- Code: Select all
credit++;
key down -> return:
- Code: Select all
if(credit>=1)
{
credit-1;
//start the game
}
//this next part can be skipped if you don't want to run any code if the player does not have enough credits
else if(credit==0)
{
//the code you want to execute if the player does not have enough credits
}
draw actor:
- Code: Select all
credits.textNumber=credit;
credit++;
if(credit>=1)
{
credit--;
//start the game
}
//this next part can be skipped if you don't want to run any code if the player does not have enough credits
else
{
//the code you want to execute if the player does not have enough credits
}
credits.textNumber=credit;
Users browsing this forum: No registered users and 1 guest