42 SERVERS ONLINE
[+]

TribesNext

Welcome, Guest. Please login or register.


TribesNext >  TribesNext.com Forums >  Tribes 2 >  Mods and Customization >  Vehicle Power... In theory... « previous next »
Pages: [1] 2 Print
Author Topic: Vehicle Power... In theory...
Severeign
Nugget
Posts: 20

View Profile
July 28, 2010, 12:39:53 PM »
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

View Profile
1: July 28, 2010, 03:15:55 PM »
getting rid of vehicles always makes the game better
Heat Killer
Seņor Nugget

Posts: 212
JJDKid
View Profile
2: July 28, 2010, 03:16:47 PM »
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 Smiley

Quote from: IRC
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

View Profile
3: July 28, 2010, 06:34:20 PM »
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

View Profile
4: July 28, 2010, 06:49:49 PM »
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

View Profile
5: July 28, 2010, 09:05:19 PM »
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

View Profile
6: July 29, 2010, 06:27:32 AM »
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

View Profile
7: July 29, 2010, 06:48:06 PM »
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.
Attached files
* BestGuess.txt (1.2 KB - downloaded 9 times.)
Severeign
Nugget
Posts: 20

View Profile
8: July 31, 2010, 09:24:36 AM »
SO... can um, someone throw Me a frikkin bone?
Heat Killer
Seņor Nugget

Posts: 212
JJDKid
View Profile
9: August 02, 2010, 01:59:26 PM »
Code:
if(!%selfPower = 0)
{
  %obj.doDismount
need to be
Code:
if(!%obj.selfPower)
{
  %obj.doDismount();

to compile and run correctly.
Note that I just glanced at it, so I prob missed something.

Quote from: IRC
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

View Profile
10: August 03, 2010, 08:55:52 AM »
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
JJDKid
View Profile
11: August 06, 2010, 10:13:40 AM »
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

Quote from: IRC
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

View Profile
12: August 08, 2010, 07:01:02 PM »
...
Attached files
* VTv2.zip (9.24 KB - downloaded 4 times.)
Heat Killer
Seņor Nugget

Posts: 212
JJDKid
View Profile
13: August 08, 2010, 07:39:29 PM »
...
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.

Quote from: IRC
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

View Profile
14: August 08, 2010, 09:01:27 PM »
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
Attached files
* VTv2.zip (9.24 KB - downloaded 2 times.)
« Last Edit: August 09, 2010, 12:01:53 AM by Severeign »
Pages: [1] 2 Print 
« previous next »
Jump to:  

irc.arloria.net / #Tribes Powered by SMF 1.1.11 | SMF © 2005, Simple Machines LLC