Scripting stuff! -1 reply

  • 1
  • 2

Please wait...

Evil_Jedi

Mapper, Skinner, Noob Scripter

50 XP

20th June 2003

0 Uploads

379 Posts

0 Threads

#1 12 years ago

Alright, I finally learned the basics of scripting a couple days back, and now I'm trying to put them into my SP mod. However, I have a few problems.

In Cutscenes I don't know how to put the player in it, or how to make the player move. I also tried to put dead NPCs lying around, like in the bakura map, the dead imperial workers lying around, and in JK2 on yavin_courtyard there is a jedi or jedi2 lying dead in one of the rooms. I read that I have to make a script like this:

SET_HEALTH 0 SET_IGNOREPAIN true SET_ANIM_BOTH BOTH_DEAD1 SET_ANIM_HOLDTIME_BOTH -1

I tried using the "affect" command in BehavED, and putting those commands under the "affect" command. I gave the NPCs I wanted to lie around dead the key: "targetname" and value:"deadnpcs". However, when I played the game, the NPCs wouldn't even show up. In my script I have this:

//Generated by BehavEd rem ( "Dead Npcs" ); affect ( "deadnpcs", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_HEALTH", "0" ); set ( /*@SET_TYPES*/ "SET_IGNOREPAIN", "true" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", "BOTH_DEAD1" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", "-1" ); }

How would I go about doing this? Thanks in advance.




Slusk

Scripter, Mapper

50 XP

6th July 2005

0 Uploads

389 Posts

0 Threads

#2 12 years ago

make a new npc that has the model as player then spawn the player as a NPC




Evil_Jedi

Mapper, Skinner, Noob Scripter

50 XP

20th June 2003

0 Uploads

379 Posts

0 Threads

#3 12 years ago

But what if the player is a custom character, like you can customize Jaden? I was hoping to do that, because I am still unsure whether I will make a set character or have it be customizable.




Slusk

Scripter, Mapper

50 XP

6th July 2005

0 Uploads

389 Posts

0 Threads

#4 12 years ago

it will automaticly pick the model that you have it customized as




FireFoxProductions

Mapper, Modder, Scripter

50 XP

11th January 2006

0 Uploads

116 Posts

0 Threads

#5 12 years ago

http://www.richdiesal.map-craft.com/darthg/cutscene/cutscene_part_1.htm http://www.geocities.com/kengomaps/tutorials.html Consulte these two main ones, But in http://www.richdiesal.map-craft.com it furthur explains more on mapping tuts. The NPC entity you wish to have as when you put down Player_start, Goto the NPC entity menu, and Its either NPC_Player (Spawns a NPC of you, targetname is essental if you read the 3 above links on such a thing..) Or NPC_Spawn and NPC_Name//NPC_Player Well, NPC_Player is something you want! Secound, You have to Look for ANIMATION lines in Behaved, Upper, Lower, Torso, Its like ANI_UPPER or something like that in Behaved for EXACT dead animations your looking for. I dont have JKA installed but I have behaved in there, and I tried messing with it. I dont know the results persay but try these.. //Generated by BehavEd rem ( "comment" ); affect ( "Player", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_HEALTH", "-1" ); set ( /*@SET_TYPES*/ "SET_NOTARGET", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_IGNOREENEMIES", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_LOOP_ANIM", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_ANIM_UPPER", /*@ANIM_NAMES*/ "BOTH_DEATH1" ); set ( /*@SET_TYPES*/ "SET_ANIM_LOWER", /*@ANIM_NAMES*/ "BOTH_DEATH1" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_DEATH1" ); set ( /*@SET_TYPES*/ "SET_BEHAVIOR_STATE", /*@BSTATE_STRINGS*/ "BS_CINEMATIC" ); set ( /*@SET_TYPES*/ "SET_DEFAULT_BSTATE", /*@BSTATE_STRINGS*/ "BS_CINEMATIC" ); } Health -1 is infinate BTW. And most NPC's need a default behavior state. And dont mind slusk, I dont understand what he was saying either!

{Edit} Targetname in your NPC Entity window to the exact in Behaved. Goes for player spawn, But most people use the NPC_Player entity anyway. As working with Behaved, and knowledge of JKA mapping. This is stuff I know alot of trial and error from. At first in the beggining it will seem very confusing, But later on it will add up for you. If I can have NPC's Lie down on thier backs, sit, meditate, do the hand signals in the one tattonie level.. I am sure you can make them dead NPCs..




Evil_Jedi

Mapper, Skinner, Noob Scripter

50 XP

20th June 2003

0 Uploads

379 Posts

0 Threads

#6 12 years ago

I'm still confused. Getting the player into a cutscene is not the same script as making dead bodies lie around. I don't want the player to show up dead if that's what you have up there. And I already know how to work the camera (somewhat) it's just making NPCs appear and do stuff that I can't find any information on, I already know of RichDiesal's and Kengo's tutorials.




lassev

Degenerate scripter

50 XP

21st June 2004

0 Uploads

847 Posts

0 Threads

#7 12 years ago

Ok. with all the more or less confusing posts, I'll just state a couple of things:

The entity keys in Radiant:

targetname: This is a spawning trigger key. If you give the ordinary targetname, the NPC needs to be spawned with a trigger event or use("targetname") in a script.

NPC_targetname: This is equivalent to the script_targetname of brush entities, and is essential for affecting in scripts, and is also used for a couple of other things. Inserting this key in Radiant doesn't require trigger event to spawn the NPC.

And since Raven used the simple script for dead NPCs succesfully, there's no need to stretch it to a double lenght with redundant commands like in FireFoxProductions' example. However, the NPC_player part was of course correct. No need to create new redundant NPC files for that. Treat it just like you would any NPC, although it may copy also some unnecessary traits from the player, but cope with it.




Slusk

Scripter, Mapper

50 XP

6th July 2005

0 Uploads

389 Posts

0 Threads

#8 12 years ago

ohh ok well, all you need to do is make a script like this:

set ( /*@SET_TYPES*/ "SET_BEHAVIOR_STATE", /*@BSTATE_STRINGS*/ "BS_CINEMATIC" ); set ( /*@SET_TYPES*/ "SET_INVINCIBLE", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_MELEE" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_DEAD1" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", -1 ); set ( /*!*/ "SET_LOOK_FOR_ENEMIES", /*!*/ "false" ); set ( /*!*/ "SET_CHASE_ENEMIES", /*!*/ "false" );

thats what I use and it works

so compile that script put it in your pk3 in your "scripts" folder if you have one if not make one.

then on your npc set in the entrie your spawnscript to be. the name of the script above.




FireFoxProductions

Mapper, Modder, Scripter

50 XP

11th January 2006

0 Uploads

116 Posts

0 Threads

#9 12 years ago

lassev knows his stuff, he is the one who pretty much helped me better understand the whole scripting concept, lassev you may know me by another 2 aliases silent savior or silent spanky. And well I dont have raident installed yet so shhh.. I was going off memory on the NPC_Player part lol.. As for scripting, true enough they have made it successfull, Using behaved for custom animations using dragon or using raven made animations for SP cutscenes is alot of trial and error for them to work properly. And if you have custom NPC's, Make sure they are have the npc script files etc.. And as what the folder name is, is the name of the npc plus you gotta add it into the ext_data npc file etc.. But I am sure you should hopefully understand more of what scripting can offer, and if you did download the MP_SDK for JKA, there is a zip called JKASCRIPTS or something like that where behaved is, in txt format giving you better on hand examples for scripting. Plus the html on scripting in the file structure is fairly usefull. Well my only "best" advice is to ask lassev anything cut-scene related. He knows more then anyone on how to sucessfully to make a very great mini-movie!




Evil_Jedi

Mapper, Skinner, Noob Scripter

50 XP

20th June 2003

0 Uploads

379 Posts

0 Threads

#10 12 years ago

Alright, through this help you guys gave me I learned some more about scripting. However I havn't gotten them to work completely yet. The dead NPCs work perfectly, but what command makes them stay in one place no matter what (even if you force lightning, push/pull or shoot them, they stay in the same place).

I am not yet done with the one where the Player appears, so I'll say more when I see it work.




  • 1
  • 2