Moving triggers

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
UZZIEL
Corporal
Posts: 39
Joined: Tue Apr 29, 2003 6:47 pm

Moving triggers

Post by UZZIEL »

HI!

Ive been lookin around that forum. A lot of threads n posts helped me to
solve my problems. :P

There are now 2 probz i cant?t solve even with combinining different threads.

1. I want to move objects but they should have the ability to print a
message if triggered by a bullet. I tried to move trigger_multiple and
noticed its not movable (NULL listener) also not skinnable. What should
I do?

2. What kind of language is used for scripting (c/c++) ?

thx for ya help

(sorry for my bad english - im from germany)
If you grab in toilets don´t wonder that your hands are brown.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Hmm check your targetnames if you get the NULL listener error.

The scripting language is called 'morpheus'.
Image
nihilo
Sergeant Major
Posts: 107
Joined: Thu Mar 13, 2003 6:07 am

Post by nihilo »

'morpheus,' really? Thought it was java. It's alot like java anyway.
User avatar
UZZIEL
Corporal
Posts: 39
Joined: Tue Apr 29, 2003 6:47 pm

hmh

Post by UZZIEL »

sorry im a noob im mapping my 2nd week - so i dont understand what you mean by targetname checking. In what dependende should my trigger_multiple be connected by triggername? I thought trigger_multiple are not movable by commands like: "moveNorth xxx" etc.

can you give me an example plzzzz :( ?

im kinda too dumb or too noobish what to look exactly after.
If you grab in toilets don´t wonder that your hands are brown.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

No you can't move a trigger with the regular move commands. However, you can glue it to a moving script_object. You can also just change the location of the trigger every frame with either the origin or setsize commands.

Probably the first way is easiest. Create a script_object with key / value 'targetname' / 'object' and a trigger_multiple with key / value 'targetname' 'trigger'. Just place them over each other, give them both the common/trigger texture.

In your script type:

Code: Select all

$trigger glue $object
$object whatevermovecommandyouwant
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Bind

Post by tltrude »

You can also use:

$my_trigger bind $my_object
$my_object moveNorth xxx
$my_object move // or waitmove
Tom Trude,

Image
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

I tried to move a higgins like Omaha, but it didnt work out that well.

1)If i used a normal vehicle, they said "moveto applied to NULL listener"
2)if i used a script model, it works, but I get stuck on top and can't fall in. At least it moves.
Live to map, not map to live.
-mohaa_rox, .map
moderator
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

bind and glue have different uses, even though they do the same thing

glue will have to be used for triggers
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
UZZIEL
Corporal
Posts: 39
Joined: Tue Apr 29, 2003 6:47 pm

result

Post by UZZIEL »

i used the proposed glue command
the same on bind

on togglemenu lveldesign i saw
both dont moved together :(
the trigger stands still while de script object is moving

Should i use another type of trigger? - then what one if it has to react on bullets?
If you grab in toilets don´t wonder that your hands are brown.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

BIND BIND BIND

Post by tltrude »

Bind works and I can prove it. Download this tutorial map and put the PK3 in your MOHAA/main folder. The map will be under Team Deathmatch.

http://pages.sbcglobal.net/tltrude/Temp ... _range.zip

The map file and a text copy of the script are included. I used trigger_multiple(s) with the damage flag set and used "bind" in the script to attach them to the MOVING targets. A message pops up when you hit a target. I think UZZIEL's problem is that he does not know how to add targetnames to things in his map.
Tom Trude,

Image
User avatar
UZZIEL
Corporal
Posts: 39
Joined: Tue Apr 29, 2003 6:47 pm

Post by UZZIEL »

ahahah lalalalal ahahahah

:D:D:D:D:

IT WORKS!!

It was not the problem of targeting ( i know how it works) even more of gluing.
Since this was my first time to "glue" i didnt know that multiple glues are not allowed so it hasnt moved.
eg:

$trigger1 glue $object
$trigger2 glue $object
$trigger3 glue $object

I removed all trigger binds and left just one in.

$trigger1 glue $object

- it worked.

Now Im happy :D
thx a lot

That Mappingfever is curious :twisted:

ps: thx 4 bots jv_map ill try to improve them by "hit ststistics" like in real
DM
If you grab in toilets don´t wonder that your hands are brown.
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

you could use more than 1 moving object if u wanted 2,

just use

$trigger1 glue $object1
$trigger2 glue $object2
$trigger3 glue $object3

giving each object seperate targetnames :D
hope this helps, prob not cos it's all foreign 2 me :-/
Post Reply