Radiant Functions

Locked
rbottoms
Posts: 27
Joined: Wed Jan 11, 2006 4:00 am

Radiant Functions

Post by rbottoms »

I've added a Warp function to my Q3 code. How do add the function to Radiant so I can use it in my maps?

Here's what I added for testing:

// new mod warp
void SP_func_warpMap (gentity_t *ent) {

EXEC_NOW, va( "map addict");

}
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post by ^misantropia^ »

You say "warp function" but do you perhaps mean "warp entity"? It looks like it but one can never be sure enough.
rbottoms
Posts: 27
Joined: Wed Jan 11, 2006 4:00 am

Post by rbottoms »

Originally I wanted to add a function called func_warpMap that I could apply to entities to jump a player to another map.

Since then I have modifed transport_palyer to do it.

Still I would like to add a custom trigger of some type ot Radiant that makes an entity into a map-to-map or server-to-server transporter.

So the question is basically, how do you add custom functions & triggers to Radiant?
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post by ^misantropia^ »

The easiest method is by creating a random entity (e.g. info_player_deathmatch) and changing the value of its "classname" key to your entity's name (transport_player).
rbottoms
Posts: 27
Joined: Wed Jan 11, 2006 4:00 am

Post by rbottoms »

>The easiest method is by creating a random entity

Yes I have done that in the .map file. Is it oossible to add that new fucntion to the Radiant IDE?
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post by ^misantropia^ »

Yep, add the new entity to your baseq3/scripts/entities.def file, something like this:
/*QUAKED func_transport_player (0 .5 .8) ?
Transport a player to another map.
-------- KEYS --------
map : map to transport player to
notfree : when set to 1, entity will not spawn in "Free for all" and "Tournament" modes.
notteam : when set to 1, entity will not spawn in "Teamplay" and "CTF" modes.
notsingle : when set to 1, entity will not spawn in Single Player mode (bot play mode).
rbottoms
Posts: 27
Joined: Wed Jan 11, 2006 4:00 am

Post by rbottoms »

Thanky!

BTW, what does 'Quaked' mean exactly?
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post by ^misantropia^ »

QUAKe EDitor.
Locked