ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Script-Controlled Things (Wishlist)
Script-Controlled Things // WishlistjohnFeb 2, 2003, 9:33am
It would be brilliant if:
You could make a simple script to make trains follow a track. You could enter each position along the track, stations, etc. and then ok it and there would be a train object following the tracks at the same time for everybody. You could get on and off at stations. Script: Trains=1 {=Train1 #Leave blank if the front and back are the same as the middle. FrontObject=FrontOfTrain.rwx BackObject=BackOfTrain.rwx MiddleObject=MiddleOfTrain.rwx #Wait 10 Sec For Passengers WaitingTime=10 #Speed (coords per second) Speed=2 # Stations=2 Positions=1 [=Station1 Location=0n 0e 0a 0 ] [=Station2 Location=4n 0e 0a 0 ] (=Position1 From=Station1 Coordinates=2n 0e 0a 0 To=Station2 ) } Although this is complex and would probably be done in an easier way, there could be a script that would be easy to understand for positioning stations & track I would love to see something implemented like this. sk8man1Feb 2, 2003, 10:07am
Yeah, that would be awesome. The only way now seems to be like just a
bot or something which takes more scripting and time than that would... [View Quote] agent1Feb 2, 2003, 1:48pm
Have you ever written a scripting language? Then don't assume you know how hard it is.
-Agent1 [View Quote] technozeusFeb 3, 2003, 3:34am
Actually, this could be done quite simply with the moveto command and the set command as outlined in my October 16th Wishlist post entitled "Command Enhancements" as follows...
On objects along the route, place the commands... create set var1 create set var2 create set var3 create set var4 create set var5 Then on the train engine place the following in it's actions field... create name=engine, animate tag=99 me x 1 1 100, astart; adone moveto var1 time=10, moveto var2 time=10 delay=10, moveto var3 time=10 delay=20, moveto var4 time=10 delay=40, moveto var5 time=10 delay=60, moveto var1 time=10 delay=60 and then just have some other object astart engine whenever you want it to run ....or for a continuous loop with a pause between runs and a long pause before the initial run you could change it to... create animate tag=99 me x 1 1 100000, astart; adone moveto var1 time=10, moveto var2 time=10 delay=10, moveto var3 time=10 delay=20, moveto var4 time=10 delay=40, moveto var5 time=10 delay=60, moveto var1 time=10 delay=60, astart Pretty simple, really. Here are the descriptions of the command syntax for the set command and the moveto command... set [varname] moveto varname [time=time] [wait=wait] [name=name] [shared=flag] or moveto [varname.x OR x] varname.y OR y [varname.z OR z] [time=time] [wait=wait] [name=name] [shared=flag] The other train cars could be set up in a similar fassion. There's quite a bit more in the post I mentioned, but these two would be enough for this type of path following. For example, an object following such a path could be made invisible and itself assign a variable using the set command, and then the orbit command could be used to make an object fly around the invisable object creating a smooth curved path that would look much less pre-planned and less predictable. TechnoZeus [View Quote] johnFeb 3, 2003, 7:23pm
I have.
Several times. A fully functional bot scripting language and a simple D++ compiler. Complete with if and split functions. [View Quote] |