Scripting tips needed

Skynet

Mildly Dipped
I need a few scripting tips:

1. How do I make the critter move between hex A to hex B continously?

2. How do I make so, that when I initiate combat, the critter will be fighting with my side?
 
1. Put a call to tile_num in the critter_p_proc procedure to check if the critter is in one of the tiles. If it is at A, move it to B, else if at B move to A etc. Use animate_move_obj_to_tile to move the critter. You could also put the above in a timed procedure to avoid calling tile_num so often.
 
if you want the critter fights with your team you have to put the line :
critter_add_trait(self_obj,TRAIT_OBJECT,OBJECT_TEAM_NUM,TEAM_PLAYER);

just before the combat. i never had to do that but i think it's something like that...btw i thing you should change the team of this critter when the figt is over
 
Back
Top