Hi!
This COG crashes my game the moment I have any picture of the level!
It didn't crash before I changed something... I changed from arrived to pulse, took away If(GetSenderRef()!=prisoner) return; and added If(out==0) return; and the IsThingMoving. Please help!
If you wonder what crashes, then create one big room, a door leading to a Command deck, and from there, a door leading to a detention center. Make 8 small crowded rooms with a different prisoner in each one that has 5 walk frames (first frame is origin). And don't forget to have different thank yous and give the correct voice to the correct creature...
/Edward
[This message has been edited by Edward (edited July 23, 2003).]
This COG crashes my game the moment I have any picture of the level!
Code:
# Open detention door and someone will run out # # By Edward symbols message activated message pulse thing door surface light thing prisoner material free int out=0 local int pos=0 local sound thanks0 sound thanks1 sound thanks2 sound thanks3 sound thanks4 sound thanks5 sound thanks6 sound thanks7 end # code activated: If(GetSenderRef()!=door) return; If(out==1) return; MoveToFrame(door,1,8); WaitForStop(door); SetSurfaceMat(light,free); PlaySoundThing(thanks0[rand()*7],prisoner,1,-1,10,0xC0); out=1; pos=pos+1; AISetMoveFrame(prisoner,pos); AISetLookFrame(prisoner,pos); SetPulse(1); return; pulse: If(out==0) return; If(IsThingMoving(prisoner)==1) return; If(pos==4) { sleep(1); DestroyThing(prisoner); } else { pos=pos+1; AISetMoveFrame(prisoner,pos); AISetLookFrame(prisoner,pos); } return; end
It didn't crash before I changed something... I changed from arrived to pulse, took away If(GetSenderRef()!=prisoner) return; and added If(out==0) return; and the IsThingMoving. Please help!
If you wonder what crashes, then create one big room, a door leading to a Command deck, and from there, a door leading to a detention center. Make 8 small crowded rooms with a different prisoner in each one that has 5 walk frames (first frame is origin). And don't forget to have different thank yous and give the correct voice to the correct creature...
/Edward
[This message has been edited by Edward (edited July 23, 2003).]