its basically a exact copy and condensed version of maps\_zombiemode_spawner (not all of it just parts i think i might need) http://pastebin.com/4ZXjQm6G
its basically a exact copy and condensed version of maps\_zombiemode_spawner (not all of it just parts i think i might need) http://pastebin.com/4ZXjQm6G
For creating a ai chain/roaming i would suggest just using structs that target each other that the ai will follow. Something like:
while(1) { if(level.special_item_taken && !level.sloth_hurt) // if the candy/booze has been taken from the spot by a player { players = get_players(); for(k=0;k<players.size;k++) { if(players[k].has_booze || players[k].has_candy) goal = players[k]; } } else if(!level.special_item_taken && !level.sloth_hurt) { for(i=0;i<structs.size;i++) { if(isdefined(structs[i].target) && structs[i].target > 1) goal = random(structs[i].target); else if(isdefined(structs[i])) goal = structs[i].target; } } else if(!level.special_item_take && level.sloth_hurt) goal = getstruct("sloth_cage_struct", "targetname"); wait(1); self setGoalEntity(goal); } }
Edit: SetGoalNode should be setGoalEntity. Hopefully it'll work fro structs.
Edit 2: if setGoalEntity doesn't work you can also just get the closest pathnode from the struct and set the goal that way too. Bit tired ATM, so sorry if i'm not being clear enough. lol
Last Edit: August 16, 2015, 08:36:48 am by daedra descent
while(1) { if(level.special_item_taken && !level.sloth_hurt) // if the candy/booze has been taken from the spot by a player { players = get_players(); for(k=0;k<players.size;k++) { if(players[k].has_booze || players[k].has_candy) goal = players[k]; } } else if(!level.special_item_taken && !level.sloth_hurt) { for(i=0;i<structs.size;i++) { if(isdefined(structs[i].target) && structs[i].target > 1) goal = random(structs[i].target); else if(isdefined(structs[i])) goal = structs[i].target; } } else if(!level.special_item_take && level.sloth_hurt) goal = getstruct("sloth_cage_struct", "targetname"); wait(1); self setGoalEntity(goal); } }
Edit: SetGoalNode should be setGoalEntity. Hopefully it'll work fro structs.
Edit 2: if setGoalEntity doesn't work you can also just get the closest pathnode from the struct and set the goal that way too. Bit tired ATM, so sorry if i'm not being clear enough. lol
sorry about the late reply, my power went out last night
ill give this a go but when i tried using SetGoalEntity it crashed saying it wasn't on a friendly chain or something like that Double Post Merge: August 16, 2015, 03:45:22 pmThanks DD that helped a lot, i had to modify it abit to fit what i wanted but now it works