Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsJedi Outcast and Jedi Academy Editing Forum → This time its a big quistion about scripting
This time its a big quistion about scripting
2004-09-25, 12:20 PM #1
So, thanks to lassev i know how to switch effects on and of, how to move func_statics, and even know how to switch doors on and off with scripting. But still, i want to script more.

My first problem, my script are good. I even tested them. But somehow i wont get them running ingame. I have the checkbox inactive switched on. I have gived the FX_runner the key:
'fxFile'
and the value:
'bolts1'

(This is completly right because the script is called 'bolts1')
Then i target a trigger_once at the fx runner. But somehow, when i walk through the trigger it wont activate the fx_runner.
Why?


Then my second quistion.
I have build a map with a door, behind the door 3 NPC_spawners and 3 navgoals to let them run to.
The door is called 'door_alarm1' (with targetname ofcourse) the NPC spawners are called 'enemy1, 'enemy2' and 'enemy3' (with targetname). And the navgoals are called: 'navgoal1', 'navgoal2' and 'navgoal3'. Now, when the door opens, i want the 3 NPC's to run to the navgoals and after that attack the player. Can someone please give me a step, by step tutorial about how to do this. Because i have just very little knowledge about scripting and i just want to be as good as lassev (he is my god in scripting :rolleyes: )

It would be nice if these longwinded quistions (and nOObish quistions) could be anwserd
2004-09-26, 1:19 AM #2
Your first question is so strange that I cannot begin to guess what you are trying to do :confused:

You talk about fx_runner, fxFile, and but then you call the fxfile a script? Was this is a typo? And check either one shot (or whatever the flag name was) or start off flag to allow you to trigger the effect on. Otherwise the effect will start on, and be turned off, when you trigger it. But if you are truly trying to run scripts, you must use target_scriptrunners, not fx_runners, of course.

What comes to the second question, you would probably handle it the easiest way if you give the npc_spawners a spawnscript in Radiant. Then the spawnscript needs to do nothing more than set the nav_goal. You can either use a general script which reads the name of the nav_goal from the npc_spawner's parm1 (which you can enter in the Radiant) or you can have a separate spawnscript with individual nav_goal names for each ST.

You also might want to have a set_enemy("player") command in the spawnscript, and perhaps set the aggressiviness level high up to ensure the guys won't just stand there after running but will shoot right away (like the good stormtroopers they are).

If this doesn't seem to work, and they don't run to the nav_goal, you could try setting them bs_cinematic for the duration of running, but that's risky business. However, only trying will tell how it turns out to work.

Code:
rem ( "general spawnscript with parm1 navgoaling" );
set ( /*@SET_TYPES*/ "SET_ENEMY", "player" );
set ( /*@SET_TYPES*/ "SET_AGGRESSION", 5 );
set ( /*@SET_TYPES*/ "SET_NAVGOAL", $get( STRING, "SET_PARM1")$ );


In Radiant NPC_spawner entity properties:
Code:
key:     Parm1
value:  navgoal1

Of course enter the appropriate navgoal# for the value.

Oh, you probably want to place some trigger or something to spawn those NPC_spawners at some point, of course...
Frozen in the past by ICARUS
2004-09-26, 3:56 AM #3
for the quistion you didnt understand. I am trying to explain it more clearly:

I have placed a trigger_once in my map. That trigger_once is targeted at the fx_runner, the trigger_once will trigger the fx_runner when the player walks through it. I have given the FX_runner

The key: runscript
The value: bolts1

But somehow when the player walks through it, the fx_runner wont run the script bolts1. I am sure that the script works, because when i open the cheat window and type: 'Runscript bolts1' It will work.

Now, I still have another quistion, Can you also let certain type's of NPC (like Reborn) jump, roll or cartwheel to a navgoal?
2004-09-26, 6:09 AM #4
You didn't clear anything, actually. I still don't get why you insist on running a script with an fx_runner, which is only meant to run effects. If you want to use an effect like that, you don't need any scripts, unless you intend to time the effect to shoot, for example, three times with one second intervals and then fall silent. If that's the case, you would just target the trigger to a script_runner, which would launch a script that would use the fx_runner three times with approprite wait values between the uses.

You can have NPCs do such tricks in bs_cinematic, as they aren't likely to obey the script in bs_default, especially if they have an enemy. Try you might, of course. Jumping you could try to enhance by architectural solutions (place some block between the reborn and the nav_goal, and the reborn is very likely to jump, in fact). You could also try some clipping, which might serve the same purpose as actual architecture.
Frozen in the past by ICARUS
2004-09-26, 8:05 AM #5
I have inserted this code:

//(BHVD)
rem ( "Lets the first NPC walk" );
set ( /*@SET_TYPES*/ "SET_ENEMY", "player" );
set ( /*@SET_TYPES*/ "SET_AGGRESSION", 5 );
set ( /*@SET_TYPES*/ "SET_NAVGOAL", "reborn_navgoal_11" );
wait ( 1000.000 );
set ( /*@SET_TYPES*/ "SET_NAVGOAL", "reborn_navgoal_12" );

That are suposed to let the NPC walk, but somehow it wont work, How to let this script work???

For information. The npc in the game is not a NPC_spawner but just a Reborn, that is spawned by a trigger once. It is supposed to walk to a navgoal that is called 'reborn_navgoal_11', wait 1 sec. and then walk to navgoal 'reborn_navgoal_12'. You said something about bs_cinematic (i knowm, the checkbox) and then turn it off. But how to turn something like that off in a script?
2004-09-26, 11:13 AM #6
If you want to set 2 nav_goals, you need to control their fulfillment somehow. Right now your script sets the first nav_goal, then a second later the second nav_goal. You should realise the NPC has hardly had time to take the first step toward the first nav_goal, before you reprogram it to try to get to the next one.

Trying is the best way of learning here, but you should also study some Raven examples. They are readily available and teach good scripting conventions (especially since they have varying styles).
Frozen in the past by ICARUS
2004-09-27, 8:23 AM #7
You can just leave this quistions for a while because i allreaddy asked you so much.

1. How can i move 3 funs_statics without crashig the game to my desktop and let the desktop turn black :rolleyes:

2 How do i let a script affect the player because somehow the key spawnscript and the script that tells something about the force powers of the player wont work.

3. How do i let a NPC do a certain type of emote. Like meditate or taunt.

Sorry that i bother you with all the quistions :( But i am a simple nOObish kid that want to learn scripting :p

↑ Up to the top!