new attribute heat should have effect on health
Posted: Mon Jan 08, 2007 11:19 pm
hi there!
I have added the Attribute 'heat' to my Player. It starts at 0 and counts up to 100.
When it reaches 100 it should reduce the Players health to 0 (or simply kill him ^^). Can somebody tell me how to do this?
I tried to add a pawn with the following script:
{Start[()
{
if(GetAttribute("heat", "Player") > 99){
SetAttribute("health", 0, "Player);
}
Delay(IDLE, 5, "");
RestartOrder();
}
]
}
it is meant to check every 5 seconds if the 'heat' attribute of the Player is 100 and if so, the player should die.
Anyway it doesnt work that way. Any ideas how to solve that problem or maybe an easier way to have the same effect?
thx for your help and ideas!
I have added the Attribute 'heat' to my Player. It starts at 0 and counts up to 100.
When it reaches 100 it should reduce the Players health to 0 (or simply kill him ^^). Can somebody tell me how to do this?
I tried to add a pawn with the following script:
{Start[()
{
if(GetAttribute("heat", "Player") > 99){
SetAttribute("health", 0, "Player);
}
Delay(IDLE, 5, "");
RestartOrder();
}
]
}
it is meant to check every 5 seconds if the 'heat' attribute of the Player is 100 and if so, the player should die.
Anyway it doesnt work that way. Any ideas how to solve that problem or maybe an easier way to have the same effect?
thx for your help and ideas!