Jump to content

Home

can this be done in JK2?


summonermw2

Recommended Posts

basicly you flip through the names of NPC's on a surface, when you find the right one you use a switch and the selected NPC spawns.

 

symbols

 

surface switch0

surface switch1

message activated

sound wav0=bcchargeup.wav

sound wav1=activate02.wav

material select07a

material select07b

thing ghost0

thing ghost1

thing ghost2

thing ghost3

 

int celnumber

 

template target0=atatpilot

template target1=atst_newdrvr

template target2=bossk

template target3=darkundead

template target4=gammorean

template target5=greedo

template target6=icommando

template target7=iofficer

template target8=ithorian

template target9=mynok

template target10=noghri

template target11=pirateped1

template target12=pirateraider3

template target13=preeyees

template target14=preeyeesgun

template target15=rancor

template target16=rcommando

template target17=rofficer

template target18=scouttrooper

template target19=statue0

template target20=statue1

template target21=stormtroop4_m

template target22=tiepilot_m

template target23=tuskan

template target24=vornskr

template target25=wampaswamp

template target26=weequay

template target27=assassindroid

template target28=probedroid

template target29=torturedroid

 

 

end

 

# ========================================================================================

 

code

activated:

if ( GetSenderRef() == switch0 )

{

if ( GetWallCel(switch0) == 14)

{

if ( GetSurfaceMat(switch0) == select07a)

{

SetSurfaceMat(switch0, select07b);

SetWallCel(switch0, 0);

PlaySoundPos(wav0, GetSurfaceCenter(switch0), 0.5, -1, -1, 0);

return;

}

else if (GetSurfaceMat(switch0) == select07b)

{

SetSurfaceMat(switch0, select07a);

SetWallCel(switch0, 0);

PlaySoundPos(wav0, GetSurfaceCenter(switch0), 0.5, -1, -1, 0);

return;

}

else

{

return;

}

 

}

SetWallCel(switch0, GetWallCel(switch0) + 1 );

PlaySoundPos(wav0, SurfaceCenter(switch0), 0.5, -1, -1, 0);

return;

}

 

else if ( GetSenderRef() == switch1)

{

if ( GetWallCel(switch1) == 1) return;

SetWallCel(switch1, 1);

PlaySoundPos(wav1, SurfaceCenter(switch1), 0.5, -1, -1, 0);

 

if ( GetSurfaceMat(switch0) == select07a)

{

 

celnumber = GetWallCel(switch0);

CreateThing(target0[0+celnumber], ghost0);

CreateThing(target0[0+celnumber], ghost1);

CreateThing(target0[0+celnumber], ghost2);

CreateThing(target0[0+celnumber], ghost3);

 

 

}

 

else if ( GetSurfaceMat(switch0) == select07b)

{

 

celnumber = GetWallCel(switch0);

CreateThing(target0[15+celnumber], ghost0);

CreateThing(target0[15+celnumber], ghost1);

CreateThing(target0[15+celnumber], ghost2);

CreateThing(target0[15+celnumber], ghost3);

 

 

}

else

{

return;

}

 

Sleep(.5);

SetWallCel(switch1, 0);

return;

}

else return;

 

# ........................................................................................

 

end

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...