Hi!
The code is for a movie thingy...
After a few hops from belman, he stops, and after I can't stop the key or make him move properly... Help!
/Edward
PS.
I'm not done with my other problems. This is a side job.
[This message has been edited by Edward (edited October 06, 2003).]
The code is for a movie thingy...
Code:
# En dag var Belman ute och hoppade på en brunnlock och räcknade: # "22, 22, 22, 22, 22..." # Då kom en polisman till honom och frågade: # "Hurru, vad håller du på med?" # "Det är kul!" svarade Belman "Vill du pröva?" # "Visst!" sa polismannen och började hoppa: # "22, 22, 22..." # Då ryckte Belman bort brunnlocket och polismannen föll. # Belman satte tillbaka locket och fortsatte hoppa: # "23, 23, 23, 23, 23..." symbols message startup message pulse message touched thing belman mask=mask=0x405 thing polisman thing brunnlock thing narbildcam thing hoppcam keyframe hoppandebelman keyframe hoppandepolisman keyframe gaendepolisman keyframe pratandepolisman keyframe belmandraratsig keyframe belmanlaggertillbaka int belmanrorelse=-1 local int polisrorelse=-1 local int nummer=10 local sound brakna1_0 sound brakna1_1 sound brakna1_2 sound brakna1_3 sound brakna1_4 sound brakna1_5 sound brakna1_6 sound brakna1_7 sound brakna1_8 sound brakna1_9 sound brakna10_0 sound brakna10_1 sound brakna10_2 sound brakna10_3 sound brakna10_4 sound brakna10_5 sound brakna10_6 sound brakna10_7 sound brakna10_8 sound brakna10_9 sound prakna1_0 sound prakna1_1 sound prakna1_2 sound prakna1_3 sound prakna1_4 sound prakna1_5 sound prakna1_6 sound prakna1_7 sound prakna1_8 sound prakna1_9 sound prakna10_0 sound prakna10_1 sound prakna10_2 sound prakna10_3 sound prakna10_4 sound prakna10_5 sound prakna10_6 sound prakna10_7 sound prakna10_8 sound prakna10_9 sound praknaf_0 sound praknaf_1 sound praknaf_2 sound praknaf_3 sound praknaf_4 sound praknaf_5 sound praknaf_6 sound praknaf_7 sound praknaf_8 sound praknaf_9 sound rakna100 sound p_vadgordu sound b_kul sound p_visst sound plask int hoppar=0 local thing urvagen thing tittahit thing tillbelman thing ner end # code startup: SetActorFlags(GetLocalPlayerThing(),0x840000); SetCurrentCamera(1); SetCameraFocus(0,hoppcam); SetCameraFocus(1,polisman); SetPulse(GetKeyLen(1)); sleep(1); nummer=20+(rand()*80); if(nummer>=100) nummer=99; thinglight(tittahit,100,2); hoppar=1; SetCurrentCamera(0); sleep(1); AISetMoveThing(polisman,tillbelman); sleep(1); while(IsMoving(polisman)) { print("*"); sleep(0.1); } StopThing(polisman); AISetMoveThing(polisman,belman); AISetLookPos(polisman,GetThingPos(belman)); sleep(1); while(IsMoving(polisman)) { print("*"); sleep(0.1); } hoppar=0; StopKey(belmanrorelse,1); PlaySoundLocal(p_vadgordu,1,0,0xC0); print("What are you doing?"); AISetLookPos(belman,GetThingPos(polisman)); sleep(GetSoundLen(p_vadgordu)); StopKey(belmanrorelse,1); PlaySoundLocal(b_kul,1,0,0xC0); SetCameraFocus(0,narbildcam); print("It's fun! Wanna try?"); sleep(GetSoundLen(b_kul)); StopKey(belmanrorelse,1); PlaySoundLocal(p_visst,1,0,0xC0); print("Sure!"); sleep(GetSoundLen(p_visst)); AISetLookPos(belman,GetThingPos(urvagen)); AISetMoveThing(belman,urvagen); AISetMoveThing(polisman,brunnlock); sleep(1); while(IsMoving(polisman)) { print("*"); sleep(0.1); } AISetLookPos(belman,GetThingPos(polisman)); AISetLookPos(polisman,GetThingPos(tittahit)); sleep(1); SetCameraFocus(0,hoppcam); hoppar=2; sleep(5); belmanrorelse=PlayKey(belman,belmandraratsig,1,0x4); sleep(0.4); TeleportThing(polisman,ner); SetCameraFocus(1,belman); hoppar=0; PlaySoundLocal(praknaf_0[y],1,0,0xC0); sleep(3); PlaySoundLocal(plask,.25,0,0xC0); sleep(1); StopKey(belmanrorelse,1); belmanrorelse=PlayKey(belman,belmanlaggertillbaka,1,0x4); MoveToFrame(brunnlock,0,2); sleep(GetKeyLen(belmanlaggertillbaka)); StopKey(belmanrorelse,1); Sleep(0.1); AISetMoveThing(belman,brunnlock); sleep(1); AISetLookPos(belman,GetThingPos(tittahit)); sleep(1); nummer=nummer+1; if(nummer<100) { hoppar=1; } else { hoppar=3; } sleep(5); thinglight(tittahit,0,5); sleep(5); JKEndlevel(1); return; pulse: x=nummer%10; y=(nummer%100)/10; StopKey(polisrorelse,0.01); StopKey(belmanrorelse,0.01); printint(nummer); sleep(0.01); if(hoppar==1) { belmanrorelse=PlayKey(belman,hoppandebelman,0,0x4); PlaySoundThing(brakna10_0[y],belman,1,-1,10,0xC0); sleep(GetSoundLen(brakna1_0[y])); PlaySoundThing(brakna1_0[x],belman,1,-1,10,0xC0); } else if(hoppar==2) { polismanrorelse=PlayKey(belman,hoppandepolisman,0,0x4); PlaySoundThing(prakna10_0[y],belman,1,-1,10,0xC0); sleep(GetSoundLen(prakna1_0[y])); PlaySoundThing(prakna1_0[x],belman,1,-1,10,0xC0); } else if(hoppar==3) { belmanrorelse=PlayKey(belman,hoppandebelman,0,0x4); PlaySoundThing(rakna100,belman,1,-1,10,0xC0); } return; touched: If((GetSenderRef()!=belman) && (GetSourceRef()!=polisman)) return; StopThing(polisman); retrun; end
After a few hops from belman, he stops, and after I can't stop the key or make him move properly... Help!
/Edward
PS.
I'm not done with my other problems. This is a side job.
[This message has been edited by Edward (edited October 06, 2003).]