Page 1 of 1
Terminal Question
Posted: Fri Aug 10, 2007 5:07 pm
by Devilshadow934
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.
Posted: Fri Aug 10, 2007 5:12 pm
by DJ_Gnomey
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.
Posted: Fri Aug 10, 2007 5:41 pm
by killarzachary
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.
I think it would be a script, but not sure.
Posted: Fri Aug 10, 2007 7:32 pm
by Devilshadow934
My bad, didn't mean to post it in the wrong section... :oops:
I have no idea how to script, I was just wondering if it was possible. I just think it would be a pretty neat idea for a mod.
Posted: Fri Aug 10, 2007 9:09 pm
by OwnZ joO
Yeah it sounds possible. I really don't know about scripting, but it's probably doable.
Posted: Tue Aug 14, 2007 10:31 pm
by ScottyGEE
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.
Posted: Tue Aug 14, 2007 11:04 pm
by -Treetoad-
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

Posted: Tue Aug 14, 2007 11:11 pm
by Zone 117
-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

Correct, no scripts.
Posted: Wed Aug 15, 2007 7:35 am
by turk645
but you still have to mess with scripts though cause its scripts that cause them to spawn in the map to begin with.
Posted: Wed Aug 15, 2007 8:33 am
by Zone 117
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.
A mach? Can't you just spawn them through the mach placement reflexive?
Posted: Wed Aug 15, 2007 10:09 am
by turk645
yeah but they get spawned through scripts in order to make them go one at a time in a random order.
Posted: Wed Aug 15, 2007 2:04 pm
by Agent ME
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'.
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)
)
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.