Jump to content

Jedi Academy turned 20 this year! We celebrated in a ton of different ways: mod contest, server event, podcast, etc. Thank you to all who have been a part of this game for the last two decades. Check out the anniversary content!

Read more

Welcome to JKHub

This community is dedicated to the games Star Wars: Jedi Outcast (2002) and Jedi Academy (2003). We host over 3,000 mods created by passionate fans around the world, and thousands of threads of people showcasing their works in progress and asking for assistance. From mods to art to troubleshooting help, we probably have it. If we don't, request or contribute!

Get started

This game turned 20 years old this year, and it is still one of the greatest Star Wars games of all time. If you're new or returning from a long hiatus, here are the basics of getting started with Star Wars Jedi Knight Jedi Academy in 2023.

Read more

Entity Modding: trigger_multiple teleporters


MoonDog

Disclaimer: This tutorial assumes you already know how to extract entities from a bsp file, make them into a .ent file and then recompile your changes back into the .bsp file.

Q: How do I make teleports without using Ysalimari's or Force Boons?

A: This concept is a little complicated, but not overly so. However, you may not understand it at first. I like to use 4 entities to do this, however you MAY use less.

 

First we need a "trigger_multiple". Now, depending on the map you are modding, the bmodels will vary. If you have Boba Fett's UU, type !bmodels to get a list. Try to find one that's physical, and small. !modelshader works good for this(Tells you the textures a certain model uses. If its something like a trigger it will say, no shader/texture found. Meaning, this is an invisible entity. Usage: !modelshader *8) . This is important because you MUST specify a brush model for this entity, or you will get an error when you load the map. Let's look at an FFA3 example.

{
"classname" "trigger_multiple"
"model" "*8"
"target" "exampletele"
"origin" "1646 -1364 292"
"spawnflags" "2"
"angle" "90"
}

As you can see on FFA3 I like to use *8. It's part of an elevator, so it's originally a func_door. However, since we are using an entity that is invisible, the model will likewise, be invisible. Now origin can't just be whatever you are looking at in the GPS/getcoords. We are cloning *8 for this. So, the position of the ORIGINAL *8 is treated as 0 0 0. So, you either have to do some math, or use Boba Fett's ultra utility(Highly Recomend!). Stand at the spot you want the trigger to be(Where you step to get teleported) and type !brushmoveorigin *8. It will give you the coordinates you need to use for the origin of the trigger. You may have to raise or lower Z depending on the Bmodel/position. *IMPORTANT* You are NOT changing the original *8 coding. You can leave that alone. Simply specify the "model" as *8 and you will have cloned it.

 

Now for the other parts of the entity. I like to make it so you have to FACE the entity to use it. (I.E. you can't walk backwards through the tele and still use it.)

To do that I simply add the spawnflag "2". (2 is facing). Since we added the facing spawnflag, we have to add the angle you need to face to use it now. "90" happens to be the direction I want people to face before they can use it. (If you need to get angles use Boba Fett's UU. Type !openmenu and navigate to the GPS. It will tell you the angle.) If you want to see other spawnflags I'd recommend downloading GTKRadiant and using the Entity List(N). It will calculate spawnflags for you if you don't have them memorized.

Alright, let's move onto the other 3 entities we need. My "target" is "exampletele". So, let's keep that in mind when writing the next ents.

Now we need the entity that actually does the teleporting. "classname" "target_teleporter". It need's to have the targetname specified in the trigger_multiple. Also, it will be targeting a "target_position"(Where you will be teleported to). So, let's write it out.

{
"classname" "target_teleporter"
"targetname" "exampletele"
"target" "exampleposition"
}

Well that was simple. Let's get the position. Go to where ever it is you want to be teleported to and use the GPS again if you have Boba Fett's UU. Note the origin and yaw(Angle you face when it spits you out at the position specified. Specify this with the "angle" key.)

{
"classname" "target_position"
"origin" "20 20 20"
"angle" "270"
"targetname" "exampleposition"
}

Now this next part is completely optional. I like to print some text to tell people where they just ended up. To do this, you need a "target_print". It needs to have the same "targetname" as the target_teleporter. We want it to be triggered by the trigger_multiple at the same time. smile.png So, let's write it out and take a look.

{
"classname" "target_print"
"targetname" "exampletele"
"message" "You in the Ghetto neow"
"spawnflags" "4"
}

Looking over it, its pretty self explanatory. In the message field you can use ^ color codes just like you do in game. Also, if you wanted to make a line break you'd use \n. Again we have a "spawnflags" key. On this entity "spawnflags" "4" makes it so only the person who triggered the Entity see's the text. If you left it out, everyone would see the text regardless of whether or not they teleported.

 

So, here's the finished deal: (Let's use // to comment the entities, so we remember what teleport it is)

{
// Trigger multiple for my first tele ever
"classname" "trigger_multiple"
"model" "*8"
"target" "exampletele"
"origin" "20 23 20"
"spawnflags" "2"
"angle" "90"
}
{
// Teleporter for first tele
"classname" "target_teleporter"
"targetname" "exampletele"
"target" "exampleposition"
}
{
// Position - first tele
"classname" "target_position"
"origin" "20 20 20"
"angle" "270"
"targetname" "exampleposition"
}
{
// Text for first tele
"classname" "target_print"
"targetname" "exampletele"
"message" "You in the Ghetto neow"
"spawnflags" "4"
}

Also, for added effect, you can place a fx_runner over the spot the teleporter is to indicate its there. I like to use force/kothos_recharge to indicate the position of my ports. All the effects can be found in assets1.pk3 in your base folder. Just open up the effects folder within the pk3. Indicate the fx with "fxfile" and make sure you include the subfolder. You should end up with something like this:

{
// FFX for first tele
"classname" "fx_runner"
"fxfile" "force/kothos_recharge"
"origin" "0 0 0"
}

User Feedback

Recommended Comments

There are no comments to display.



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...