Page 1 of 1

message when opening doors

Posted: Wed Jul 09, 2003 2:32 pm
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.

Posted: Wed Jul 09, 2003 2:58 pm
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 :)

Posted: Fri Jul 11, 2003 12:11 pm
by m4rine
thanks jv! ill try it and let u know if it works
:D

Trigger

Posted: Fri Jul 11, 2003 1:41 pm
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.

Posted: Sat Jul 12, 2003 8:41 pm
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

Posted: Sat Jul 12, 2003 11:23 pm
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!

Posted: Sat Jul 12, 2003 11:26 pm
by Alcoholic
if you update to 1.1, you dont get that needs localization stuff anymore.