Page 1 of 1

Yet another coding question...

Posted: Sat Dec 30, 2006 1:08 pm
by lord_kungai
2 questions, rather...



How do I:

1) Create a vehicle booster? By this I mean some type of mutator that allows a vehicle to move extremely fast for a short period of time when a certain button is pressed. Like a NOS booster. Also, can something similar be applied to a player? Like, when a player fires a certain weapon, the player zooms forwards, in the direction in which the player is looking, sort of like a booster? the JetPack mutator only makes players fly like a raptor...

2) Make a weapon that is ONLY glowy things? I mean, I want to create a weapon that basically has no weapon body, but makes the players hands glow like when holding the relic of strength, and makes their legs glow like when the speed adrenaline combo is active...

Posted: Sun Dec 31, 2006 4:16 am
by jeditobe1
In response to the first.

One easy way to do it is take the direction the player is facing, then add velocity to the players velocity in that direction.

Posted: Sun Dec 31, 2006 8:59 am
by lord_kungai
jeditobe1 wrote:In response to the first.

One easy way to do it is take the direction the player is facing, then add velocity to the players velocity in that direction.
That's what I'll try. Thanks! :D

Re: Yet another coding question...

Posted: Sun Dec 31, 2006 4:18 pm
by jb
lord_kungai wrote:2 questions, rather...



How do I:

1) Create a vehicle booster? By this I mean some type of mutator that allows a vehicle to move extremely fast for a short period of time when a certain button is pressed. Like a NOS booster. Also, can something similar be applied to a player? Like, when a player fires a certain weapon, the player zooms forwards, in the direction in which the player is looking, sort of like a booster? the JetPack mutator only makes players fly like a raptor...

2) Make a weapon that is ONLY glowy things? I mean, I want to create a weapon that basically has no weapon body, but makes the players hands glow like when holding the relic of strength, and makes their legs glow like when the speed adrenaline combo is active...
For number 1) on vechiles you can not just give them a velocity boost. You have to work with thier phyiscs. I want to say its in the kapplyforces function. But we have examples in our EMP Nades where we slow down the vehicle using the physics. I am traveling back to my home in Fl and dont have access to my code so can not look it up. But its simular to our boost fuction in the hyperboard. Look at that code which you should have. For players Jedi was rigth on the money.


For 2 why do you want a weapon to do that? Maybe just go with an inventory item?

Posted: Sun Dec 31, 2006 5:45 pm
by jeditobe1
Id guess he wants a magic weapon. Glowy things being spell particles etc.

Posted: Sun Dec 31, 2006 5:56 pm
by R.Flagg
Had fun with Dark Magic & Chaos way back when. Wasn't that what it was called?.

(slipping a bit OT I guess)

Posted: Mon Jan 01, 2007 10:24 am
by lord_kungai
jeditobe1 wrote:Id guess he wants a magic weapon. Glowy things being spell particles etc.
You got it right on the money again...


I'm trying to make something like a magic mutator. Except maybe not magic. I'll call it psionics or something like that. :D

Posted: Mon Jan 01, 2007 7:25 pm
by jeditobe1
Yeah think it was dark magic.

I tried it out but never got the hang of most of the spells. Then i picked up strangelove and chaos ...

Posted: Tue Jan 02, 2007 10:11 am
by lord_kungai
Howabout if I tried to make...


THE FORCE...?

Ok, that is a sucky idea. Nah, I'm just going to stick to the basics now: weapons that look like magic and with magical names, but which just are modifications of pre-existing weapons (a minigun which sprays very wide arcs of lightning bolts, a very long link gun alt-fire, etc., etc...)

Posted: Thu Jan 04, 2007 11:56 pm
by Wormbo
The weapon thing: Try making a weapon without a mesh and *cough* "borrow" the relic of strength glow effects. You would have to attach them when the weapon is selected and remove them when the weapon is put down.

Posted: Fri Jan 05, 2007 3:57 am
by Romulus777
another great responce from a forum member I didn't know exsisted. You guys need to come by more often

Posted: Fri Jan 05, 2007 7:30 am
by jeditobe1
Look at the lighting gun attachment for an easy way to handle the spawning/despawning of the third person effects.

Make your attachment just like that using ThirdPersonEffects() and Destroyed(). Set DrawType to none (so it doesnt draw the mesh), then attach the emitter you spawn to the player's weapon bone (look at the AttachToPawn code in AssaultRifle for how to get the bone's name for the players hand, and similarly if you want offhand glow effects the off hand)