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!
new attribute heat should have effect on health
new attribute heat should have effect on health
I need this for my academic studies. Plz help
do you have another script or something adding heat to the attribute? if not you might want to have a levelcontroller script that makes the attribute increase when he touches something that is hot.
Jonas
Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
hi!
Im sorry, i think i sound noobish... ^^
I added a heat attribute to the player.ini . I even have a heatbar ingame that shows me my current heat.
i have no idea what a levelcontroller script is, or how i could use something like that.
making the heat increase is not the problem (i simply added a changeattribute entity to the level that triggers when i access a certain area).
The problem is that something... no ANYTHING should happen when heat is 100 (full) (something like restart the level, die, teleport to a certain point...)
Im sorry, im such a noob... but can you explain in easy to understand for me, how i can add a script or anything that works to my level?
sorry again for my noobishness and thanx for your patience.
Im sorry, i think i sound noobish... ^^
I added a heat attribute to the player.ini . I even have a heatbar ingame that shows me my current heat.
i have no idea what a levelcontroller script is, or how i could use something like that.
making the heat increase is not the problem (i simply added a changeattribute entity to the level that triggers when i access a certain area).
The problem is that something... no ANYTHING should happen when heat is 100 (full) (something like restart the level, die, teleport to a certain point...)
Im sorry, im such a noob... but can you explain in easy to understand for me, how i can add a script or anything that works to my level?
sorry again for my noobishness and thanx for your patience.
I need this for my academic studies. Plz help
- QuestOfDreams
- Site Admin
- Posts: 1520
- Joined: Sun Jul 03, 2005 11:12 pm
- Location: Austria
- Contact:
i finally found a way! thx for your help!
{
Start[ ()
{
Console(true);
AddTriggerOrder("Check", "heat", 0);
} ]
Check[ ()
{
if(GetAttribute("heat", "Player") = 100) {
ModifyAttribute("health", -100, "Player");
}
Delay("", 1, "");
AddTriggerOrder("Check", "heat", 0);
} ]
}
When heat is 100 and the player triggers the hot area he dies.
I put it in a 'robot' pawn... I dont know if thats necessary, but i wont change it. (First rule of informatics: never touch a working System , i'll simply hide that guy somewhere )
{
Start[ ()
{
Console(true);
AddTriggerOrder("Check", "heat", 0);
} ]
Check[ ()
{
if(GetAttribute("heat", "Player") = 100) {
ModifyAttribute("health", -100, "Player");
}
Delay("", 1, "");
AddTriggerOrder("Check", "heat", 0);
} ]
}
When heat is 100 and the player triggers the hot area he dies.
I put it in a 'robot' pawn... I dont know if thats necessary, but i wont change it. (First rule of informatics: never touch a working System , i'll simply hide that guy somewhere )
I need this for my academic studies. Plz help