Here are two cogs, you can probably tell what they do. As they are now, when the mission is failed, it ends the episode. What i want is, inseat od the level ending, to restart at the last saved position.
------------------
Sanctum de la Mort
Code:
#Don't get seen. # #[GoY] # #If you wish to add more start and stop surfaces, just create new surfaces #with different names and have linkid=1 for start and linkid=2 for stop #If you wish to add more bots, make multiple copies of the cog. symbols thing playa local vector pso local thing baddy linkid=3 surface crtl linkid=1 thing crtl2 linkid=2 sound failed sound deact message activated message startup message pulse message killed end code activated: if (GetSenderId()==1) { SetPulse(0); GetSurfaceCenter(crtl); PlaySoundPos(deact, pso, 1, 0, 10, 0x0); SetWallCel(crtl,1); } if (GetSenderId()==2) { SetPulse(0); pso=GetThingPos(crtl2); PlaySoundPos(deact, pso, 1, 0, 10, 0x0); } return; startup: playa=GetLocalPlayerThing(); SetPulse(1); return; killed: if (GetSenderId()==3) { print("Mission Objective Failed"); PlaySoundGlobal(failed, 1, 0 ,0x4); sleep(1); jkendlevel(0); } return; pulse: if (hasLOS(playa,baddy)==1) { print("Mission Objective Failed"); PlaySoundGlobal(failed, 1, 0 ,0x4); sleep(1); jkendlevel(0); } return; end
Code:
#Don't get seen. # #[GoY] # #If you wish to add more start and stop surfaces, just create new surfaces #with different names and have linkid=1 for start and linkid=2 for stop #If you wish to add more bots, make multiple copies of the cog. symbols surface start linkid=1 surface stop linkid=2 thing playa local thing baddy linkid=3 sound failed message crossed message pulse end code startup: playa=GetLocalPlayerThing(); return; crossed: if (GetSenderId()==1) { SetPulse(1); } if (GetSenderId()==2) { SetPulse(0); } return; pulse: if (hasLOS(playa,baddy)==1) { print("Mission Objective Failed"); PlaySoundGlobal(failed, 1, 0 ,0x4); sleep(1); jkendlevel(0); } return; end
------------------
Sanctum de la Mort