Terminal Question
-
- Posts: 278
- Joined: Sat Jul 09, 2005 12:35 am
Terminal Question
Would it be possible to link a controller/button to the train? So you would have to press 'X' to make a train come? I don't know if this could be possible via a simple script, or if it's more complex than that.
Thanks for any help.
Thanks for any help.
I hate websites that make you register to download their stuff......
Yes it would but you psoted your question in the tutorials section instead of the modding discussion. Post your questions there enxt time!
It is not a script but more referencing the machine to the control (which would eb a button or keypad) that triggers the given action. A script may be needed for the train to move like that but I am not sure.
It is not a script but more referencing the machine to the control (which would eb a button or keypad) that triggers the given action. A script may be needed for the train to move like that but I am not sure.

- killarzachary
- Posts: 934
- Joined: Sat Mar 03, 2007 9:26 am
- Location: High School
- Contact:
![]() |
![]() |
![]() |
I think it would be a script, but not sure.DJ_Gnomey wrote:Yes it would but you psoted your question in the tutorials section instead of the modding discussion. Post your questions there enxt time!
It is not a script but more referencing the machine to the control (which would eb a button or keypad) that triggers the given action. A script may be needed for the train to move like that but I am not sure.
-
- Posts: 278
- Joined: Sat Jul 09, 2005 12:35 am
I've moded your ill-placed topic to the proper place. I am being extremely lenient here, I could have just deleted your topic, mainly because OF THIS...You know, those things that are up the top of the forum designed for people like you to READ? Yeah, they're there for YOUR help, to save yourself from rants from myself, others and flames and generally just not getting your questions answered.
Please, think a little before posting next time, or you may find that your post goes missing.
Please, think a little before posting next time, or you may find that your post goes missing.
- -Treetoad-
- Posts: 736
- Joined: Sat Jun 03, 2006 7:58 pm
- Contact:
![]() |
![]() |
Correct, no scripts.-Treetoad- wrote:I'm pretty sure it has nothing to do with scripts, just linkage from the control to the mach. But then again, I'm a newb


[ AI Revision ][ Sewer ][ Boat Mod ][ Archaic ]
Remapped: Mod Archive and Forums.
but you still have to mess with scripts though cause its scripts that cause them to spawn in the map to begin with.

"Before you criticize someone, walk a mile in their shoes. That way after you make fun of them, you still have their shoes."-Dranciel ಠ_ಠScottyGee wrote:Smokers suck >_< (to avoid someone saying it later, both literally and in the derogatory way)
A mach? Can't you just spawn them through the mach placement reflexive?turk645 wrote:but you still have to mess with scripts though cause its scripts that cause them to spawn in the map to begin with.


[ AI Revision ][ Sewer ][ Boat Mod ][ Archaic ]
Remapped: Mod Archive and Forums.
yeah but they get spawned through scripts in order to make them go one at a time in a random order.

"Before you criticize someone, walk a mile in their shoes. That way after you make fun of them, you still have their shoes."-Dranciel ಠ_ಠScottyGee wrote:Smokers suck >_< (to avoid someone saying it later, both literally and in the derogatory way)
I think you'd need to use scripts to get that to work - it seems like the train starts going soon as it's created.
To do this I'd think you'd need to set up a control pad like the one on Zanzibar, and put it in a repeatable-use device group called 'button'.
Not sure if there are any compilers that could handle that script out of the box, and I've never been successful in adding a control group to a map that didn't have one already.
To do this I'd think you'd need to set up a control pad like the one on Zanzibar, and put it in a repeatable-use device group called 'button'.
Code: Select all
(global boolean last_status false)
(script continuous train_spawner
(sleep_until (!= (device_group_get button) last_status))
; Player has pressed button
; update last_status for next use
(set last_status (not last_status))
; randomly spawn one of the trains
(if (= 0 (random_range 0 2))
(begin
(object_create eastbound_train)
(object_create eastbound_death)
)
(begin
(object_create westbound_train)
(object_create westbound_death)
)
)
(sleep 240)
(object_destroy eastbound_train)
(object_destroy eastbound_death)
(object_destroy westbound_train)
(object_destroy westbound_death)
)