Quote:
Originally Posted by FidoW
The NASC syntax looks like C1... isnt using objects (myself, gg) but in the compiled code is using C4 ids, and in some functions use objects and others not... looks like he was trying to do a mix or whatever...
For those who try to learn... here the correct code..
|
Thank you very much
Tell me please, where I can found information about objects ?
I understand, for example, what mean myself and attacker, but what mean gg ?
Another question.
Can I use my own vars in nasc code ?
For example :
Code:
class warrior_flee : warrior {
handler:
EventHandler NO_DESIRE() {
myself->AddMoveAroundDesire(40,20);
}
EventHandler ATTACKED(attacker,damage) {
my var1 = gg->Rand(3);
if (var1 == 1) {
myself->Say("Text1");
}else if (var1 == 2) {
myself->Say("Text2");
}else{
myself->Say("Text3");
}
myself->AddFleeDesire(attacker,30);
}
}