Severeign
Nugget
Posts: 20
|
So, I have been playing with a CTF map and I have had an idea which I shall not bore you with. But the question I have is, while playing with vehicles I noticed this dynamic field
selfPower = "1";
I tried to create a group of vehicles powered by a generator, by changing this field to "0" and placing all the vehicles in an isolated simgroup with a gen. But nothing interesting happens when the gen goes down so... 1). How do we take advantage of this field and create generator dependent vehicles?
2). If this can work... what happens to people in the vehicle when the gen goes down? (auto-eject would be nifty)
3). I am interested in learning some more advanced scripting... or basic scripting for that matter. Any volunteers to sit down and gimme some pointers, on IRC or whatever? (you people know who you are)
-----> Red, if this works there will be a map out there that you can destroy the gen and disable any vehicle in play on the opposing team! Won't that be fun huh?
|
|
|
|
|
Red Shifter
Scout
Posts: 342
|
getting rid of vehicles always makes the game better
|
|
|
|
|
Heat Killer
Seņor Nugget
Posts: 212
|
neat idea, but i believe it could be done. Make a mission-side package (so that it only runs when the map is played) to add a ::onDestroyed function to disable vehicles for the team. also you'll need to add a function to handle if a user tries to get in a disabled vehicle. Just remember to make the map server-side so people will actually play it 
|
Eolk{s}: This is my third bandaid. And I'm bleeding through it... TriggerFinger: What did you do to yourself? or are you going emo on us? Eolk{s}: I punched a wall four times.
|
|
|
Severeign
Nugget
Posts: 20
|
Okay... super, that doesn't really answer any questions as to how and, what kind scripting needs to be done. I am only vaguely familiar with scripting in general. And as a general rule I try and make all maps server side. So scripters is there a way to call that sort of function in a .mis contained script? have vehicles powered by a gen which, when disabled, all vehicles will eject players and stop functioning until the generator is repaired?
|
|
|
|
|
Kryand
Assault
Posts: 647
|
Generator onDisabled foreach vehicle in MissionCleanup if !selfPower doDismount powered=0 Vehicle onMount if !powered return
Paraphrased of course. Add some syntax and a package, and that's about it.
|
|
|
|
Severeign
Nugget
Posts: 20
|
I might be able to muddle through that, check back in a few days when I can wrap my head around that!
|
|
|
|
|
Kryand
Assault
Posts: 647
|
Your questions have been answered. It's possible and easy - all it takes is a package with 3 or 4 short functions. If you still need more help, you should consider asking someone to just write the whole script for you. I think Red Shifter writes map scripts all the time for mappers who don't know anything about scripting.
|
|
|
|
Severeign
Nugget
Posts: 20
|
Okay, I have tried to string things together in a way that might work, but without knowing what functions can be used where I fear I am at a loss, could one of you fabulous scripters out there piece this together for me? I have been trying all day on and off but I can't figure it out. Here is My best guess I know I'm off, but I get the feeling I'm not TOO far off so please help.
|
|
|
|
|
Severeign
Nugget
Posts: 20
|
SO... can um, someone throw Me a frikkin bone?
|
|
|
|
|
Heat Killer
Seņor Nugget
Posts: 212
|
if(!%selfPower = 0) { %obj.doDismount need to be if(!%obj.selfPower) { %obj.doDismount(); to compile and run correctly. Note that I just glanced at it, so I prob missed something.
|
Eolk{s}: This is my third bandaid. And I'm bleeding through it... TriggerFinger: What did you do to yourself? or are you going emo on us? Eolk{s}: I punched a wall four times.
|
|
|
Severeign
Nugget
Posts: 20
|
thank you for looking at it Heat, I understand scripters get harrassed a lot. I'll try this modification and see if yields Me any results I am serious as well about seeing if someone here will show Me a little bit about tribes scripting. The only thing I understand is the format, and as you can see... that understanding isn't great. Somewhere there is a rather in depth tutorial for torque engine scripting, but it has no real bearing on the functions called in T2.
|
|
|
|
|
Heat Killer
Seņor Nugget
Posts: 212
|
thank you for looking at it Heat, I understand scripters get harrassed a lot. I'll try this modification and see if yields Me any results I am serious as well about seeing if someone here will show Me a little bit about tribes scripting. The only thing I understand is the format, and as you can see... that understanding isn't great. Somewhere there is a rather in depth tutorial for torque engine scripting, but it has no real bearing on the functions called in T2.
if you wanna pm me ur mis file with the script package i could try and get it working sometime soon. i got nothin else goin on haha
|
Eolk{s}: This is my third bandaid. And I'm bleeding through it... TriggerFinger: What did you do to yourself? or are you going emo on us? Eolk{s}: I punched a wall four times.
|
|
|
Severeign
Nugget
Posts: 20
|
...
|
|
|
|
|
|
|
|
Heat Killer
Seņor Nugget
Posts: 212
|
...
move the vehicles out of the Vehicle SimGroup and into the MissionCleanup SimGroup. The solar panels don't have the added variable so it doesnt 'shut down' the vehicles. And I believe you didnt put all the vehicles 'team' var correctly.
|
Eolk{s}: This is my third bandaid. And I'm bleeding through it... TriggerFinger: What did you do to yourself? or are you going emo on us? Eolk{s}: I punched a wall four times.
|
|
|
Severeign
Nugget
Posts: 20
|
errr oops, I remade the vehicles and put them in that sim group to copy and paste to mission cleanup.. apparently I forgot. Will double check team variables.
----FIXED
|
|
|
« Last Edit: August 09, 2010, 12:01:53 AM by Severeign »
|
|
|
|
|
|