Page 1 of 1

please help me!!!

Posted: Tue Nov 07, 2006 10:56 am
by BLACK_PHOENIX
how can i make a sript that for example :

i have a base lvl (like a hub where i choose a certain mission) and i have a selection of missions but only one is available. then i play the first lvl, finish and return to base lvl. then the second mission is available now becuase i finished the first lvl. etc.

i want a mission by mission script but instead of going in order i choose what mission i want form lets say a npc in a base lvl where i return after each mission.(i also want it so that a mission cant be played unless the previous is finished)

please help. :cry:

Posted: Wed Nov 08, 2006 7:55 pm
by jonas
So you don't want the npc to have the option available intill the level is finished right?

You would have a level controller script. In the level controller script you can have an eventstate start and have it set to false. When the mission is completed it changes the eventstate to true. Then you have your pawn waiting for the eventstate to become true, once it does the conversation becomes available.
scripting_lc.s wrote: WaitFlag[()
{
self.ThinkTime = 0.1;

if(GetEventState("ForceCamera1")=false)
{ self.think = "CheckDistance"; }
else
{ self.think = "WaitFlag"; }
}]
scripting_virgil.s wrote: Spawn[()
{
//Console(true);
SetEventState("ForceCamera1", true);
SetHudDraw(false);
Scale(1.15);
MoveForward("Walk", SPEED, 45, "");
RotateMove("", SPEED, SPEED, 0, -40, 0, "");
MoveForward("", SPEED, 100, "");
RotateMove("", SPEED, SPEED, 0, -70, 0, "");

ShowTextDelay(1, "Nout", "Idle", "Hello,<CR>My name is Nout.", FONT, 2, "", 0, -150, "left", 255);
ShowTextDelay(2, "Nout", "Idle", "This is a small demo showing<CR>some of the new scripting features", FONT, 2, "", 0, -150, "left", 255);
ShowTextDelay(3, "Nout", "Idle", "Note the multi-line feature<CR>and alignments in this text!", FONT, 2, "", 0, -150, "left", 255);
ShowTextDelay(4, "Nout", "Idle", "Just sit back and watch...", FONT, 2, "", 0, -150, "left", 255);
SetFlag(1, true); //Start up Rob to walk in
NewOrder("WaitForRob");
}]
and instead of doing it like they did and having the level controller wait you could have the pawn wait.

You also might try using flags.

I hope that helps.

Posted: Fri Nov 10, 2006 4:54 am
by BLACK_PHOENIX
thanks.

but i still have questions:

1. what do i do so that when i come up to the pawn, the pawn does not ask me until i press a key eg. shift



2. how do i do it so that a message/image comes up on top of the pawns saying talk. then i click the actual image/message and it opens up a mission menu. i want the message to face me at all times. i also want it so that the message only comes up when im within 10 texels away from the pawn.


3. i wnt the pawn to appear on my radar as an ally(green). the same as Q2 but how can i make it so that i come up to the pawn and click on him. then the mission menu comes up

4. how can i have no weapons(1st p-m) in a certain lvl.