message when opening doors

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
m4rine
Major General
Posts: 714
Joined: Fri Apr 11, 2003 5:28 pm
Location: UK

message when opening doors

Post by m4rine »

i am trying (but failing) to get a message appearing when you open a door, and a grenade given to you automaticly.

i.e.

open door:

get a grnade

message: you found a greanade

the message is second priority, it matters but the grenade is the important bit.

any help would be much appriecated.
"We must become the change we want to see in the world" (Mahatma Gandhi)
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

You can try a script_door with an openthread key.

Example:
key / value : openthread / dooropenend

Script:

dooropened:
$player ammo agrenade 1 // for singleplayer only!
end

Not sure if this works but you can try :)
Image
m4rine
Major General
Posts: 714
Joined: Fri Apr 11, 2003 5:28 pm
Location: UK

Post by m4rine »

thanks jv! ill try it and let u know if it works
:D
"We must become the change we want to see in the world" (Mahatma Gandhi)
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Trigger

Post by tltrude »

Trigger_multiple will print a message in the center of the screen. So you could place the trigger just inside the door opening and set:

Key: message
Value: Pick up a granade!
Key: cnt
Value: 1

That will only be triggered one time. Maybe you can use that on the door entity itself--it does have a built-in trigger. Don't give the door a targetname, or the built-in trigger will be disabled.

You could also put a small trigger_multiple on the granade, with a message. But, if the player has to hit the use key to get it, a trigger_useonce might be better.
Tom Trude,

Image
m4rine
Major General
Posts: 714
Joined: Fri Apr 11, 2003 5:28 pm
Location: UK

Post by m4rine »

thanks

which method would be better? jv_map's or tltrude's?

jv's is scripting, and i dont particulally mind that. i dont mind not scripting.

:?: :D
"We must become the change we want to see in the world" (Mahatma Gandhi)
crunch
Major
Posts: 348
Joined: Sat Jun 14, 2003 2:34 pm
Location: USA
Contact:

Post by crunch »

Don't forget, if you use tltrude's method, you will need to copy the localization.txt file, and add your message to the file. If you don't, instead of "Your message" you will get "ERROR:Your maessage needs localization".

Like jv_map said, his mehod will work for single player.

Now, this is untested, but you could also try opening the entity window with your grenade selected, and try to add k/v message/yourmessage, and see if it works.
That is not tested, and just a suggestion. If you try and it works, let us know!

Kill Ya Later!
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

if you update to 1.1, you dont get that needs localization stuff anymore.
Post Reply