I wanted to do this in versus mode of he-man so at the beginning of the round enemies cant move and attack, i know i can do it by editing their spawn animation but i would like to enable ai in the same time for enemies and players, it works good only for players but for some reason when i want to get target of player character (which is enemy) then disable ai script doesnt work on enemy.Its not called in player character, its called in VS entity which controls spawning of Versus text and end of the round etc.
This is very trivial task so i didnt expect it not to work when it works for playables.
Im using
This to detect and disable enemy AI but it doesnt work
void P1 = getplayerproperty(0,"entity");
void opp = getentityproperty(P1, "opponent");
changeentityproperty(opp,"noaicontrol",1);
Any clues why it doesnt work? I have this script in spawn animation of VS entity and it runs when enemy and player are spawned in stage.
Is there any easier way to just disable AI for all "type enemy" entities in stage without detecting playables opponent etc ?
This is very trivial task so i didnt expect it not to work when it works for playables.
Im using
This to detect and disable enemy AI but it doesnt work
void P1 = getplayerproperty(0,"entity");
void opp = getentityproperty(P1, "opponent");
changeentityproperty(opp,"noaicontrol",1);
Any clues why it doesnt work? I have this script in spawn animation of VS entity and it runs when enemy and player are spawned in stage.
Is there any easier way to just disable AI for all "type enemy" entities in stage without detecting playables opponent etc ?