trigger_changetarget Created 15 years ago2008-12-09 13:52:27 UTC by Frozen Storm Frozen Storm

Created 15 years ago2008-12-09 13:52:27 UTC by Frozen Storm Frozen Storm

Posted 15 years ago2008-12-09 13:52:27 UTC Post #259666
Can the trigger_changetarget change the 'next stop' property of a path_corner entity?

If it can, then I'm doing something wrong, so please explain, what I have to do (I put the name of the path_corner in the 'target' field of the trigger_changetarget and the name of the path_corner that's supposed to become the next stop into the 'newtarget' field of the trigger_changetarget).

If it can't, then why not? I mean the next stop does have the key 'target' if you disable smartedit. :|
Posted 15 years ago2008-12-09 14:42:53 UTC Post #259668
You need to type in the new target in the "new target" field.
The Mad Carrot The Mad CarrotMad Carrot
Posted 15 years ago2008-12-09 17:45:40 UTC Post #259673
I do. OK, let me put it like this.
Elevator has the stops: Stop1, Stop2, Stop3. Stop2 has next stop set to Stop3 but I want a button to change that.
So I make a button that triggers a trigger_changetarget with the following in its properties (smartedit turned off):
targetname: ChangeTarget
target: Stop2
delay: 0
m_iszNewTarget: Stop1
But it doesn't work.
Posted 15 years ago2008-12-09 18:10:30 UTC Post #259676
Post the map in the problem maps vault.
The Mad Carrot The Mad CarrotMad Carrot
Posted 15 years ago2008-12-09 18:41:47 UTC Post #259677
I can't. It says There seems to be a problem with what you are trying to do.
The specific problem is: file type
I'm sure I selected the .rmf map (while browsing), I didn't select link and I checked only RMF at the map types.
Also the map has only 64KB.
I added a screenshot, which is a .jpg file.
Posted 15 years ago2008-12-09 19:10:19 UTC Post #259678
You need to zip it...
The Mad Carrot The Mad CarrotMad Carrot
Posted 15 years ago2008-12-09 21:12:03 UTC Post #259692
I don't know for sure, but trigger_changetarget will only change a keyvalue that is named 'target'. I'm pretty sure path_corners have a 'Fire on Pass' field that means to target an entity when the train reaches it, so this may actually be the 'target' field that the trigger_changetarget is trying to change. Thats probably why it won't work. Only func_track_trains have the ability to branch paths but even then, it won't work for different floors.
Posted 15 years ago2008-12-10 10:55:19 UTC Post #259718
I just did a quick test and it works perfectly on path_corners. I think you either misnamed something or forgot a property.

Here's the rmf for you to examine: http://www.themightyatom.nl/stuff/change_target_test.rmf

The yellow button starts the train. The train goes left.
The red button targets a trigger_changetarget, which targets the second path_corner named stop2 and changes its next stop target from stop3 to stop2a, making the train go right.
The Mad Carrot The Mad CarrotMad Carrot
Posted 15 years ago2008-12-10 19:04:47 UTC Post #259751
hmm... ok if it works fine, I'll try again tomorrow. If it still doesn't work, then I'll check your rmf.
(do you think the problem could also be that I have the 3.4 edition of the hammre?)
meanwhile what about my inability of posting the map in the map vault?
Posted 15 years ago2008-12-10 19:36:06 UTC Post #259752
do you think the problem could also be that I have the 3.4 edition of the hammre?
No. You can consider upgrading to version 3.5. Get the executable from my website.
what about my inability of posting the map in the map vault?
Like i said, you need to zip your file.
The Mad Carrot The Mad CarrotMad Carrot
Posted 15 years ago2008-12-12 10:38:48 UTC Post #259796
You need to zip it...
Like i said, you need to zip your file.
wow how the hell did I miss your first post? :o :zonked:

anyway now I got it to work but it doesn't work the first time I press the button.
I made the button trigger a multi_manager which triggers the trigger_changetarget and then 1 second later the elevator but for some reason it would appear that it triggers the elevator first (yes, I doublechecked that the elevator has a value of 1 and the trigger_changetarget has a value of 0 in the multi_manager), because after the first time it works fine.

Anyway I posted the map, please check it out. Meanwhile I'll download and check yours and maybe I'll be able to figure out something by myself.

EDIT: ok I checked your map but I can't find any difference except that you used 2 buttons and I used one with a multi_manager. Did I do something wrong in the multi_manager? :zonked:
Posted 15 years ago2008-12-12 11:37:21 UTC Post #259799
Ill check it out. Stay tuned.

Edit:
Ok, try this: http://www.themightyatom.nl/stuff/3floor_elevator_test_map.rmf

Also, do not user uppercase characters in entity strings (names and targets), this may cause problems.
The Mad Carrot The Mad CarrotMad Carrot
Posted 15 years ago2008-12-12 12:03:22 UTC Post #259805
ooh so I have to target the elevator with the trigger_changetarget?
Posted 15 years ago2008-12-12 12:42:48 UTC Post #259807
I think so, that did the trick.
The Mad Carrot The Mad CarrotMad Carrot
You must be logged in to post a response.