View Full Version : Im new at this and I need some info
Gamblor
20th Jan 2000, 05:25 PM
Ive never done more than make a few basic changes and they never work but I got an idea for a sweet mute so here are the questions:
Is there a way to change the velocity of all projectiles (bullets, rockets, etc) without changing any other speeds? (player speeds, lift speeds, etc)
If that is possible is there a way to make that happen by picking up an item, and only for a certian period of time?
And finally how do you change what an item looks like?
[NBK]Beavis
20th Jan 2000, 05:45 PM
You could write a fairly simple mutator to change the speed of all projectile. Note that not all weapons fire projectiles, some are instant hit weapons (like mingun, enforcer, primary shock rifle), and there is no 'speed' to adjust with those weapons.
Your mutator would look something like this ...
class AdjustProjectile expands Mutator;
function CheckReplacement ( Actor Other, out byte bSuperRelevant)
{
if ( Other.IsA ('Projectile') )
{
Other.Speed = Other.Speed * X;
Other.MaxSpeed = Other.MaxSpeed * X;
}
bSuperRelevant=0;
return true;
}
Replace the X above with some value. For example 1.3 would increase the speed of all projectiles by 30%.
To increase the speed of one type of projectile, replace 'Projectile' in the IsA function with a specific projectile name. You can find the names in the UT editor under classes/actors/projectile. Since Unreal and UT projtiles are lumped together, to figure out what each UT weapon fires, look for the Spawn function call in each weapon script under classes/actors/inventory/weapons/tournamentweapons, for both the primary and secondary routines.
Look at www.planetunreal.com/mutation/ (http://www.planetunreal.com/mutation/) for info on how to create a mutator (ie make it accessible to the game and other people).
{NBK}Beavis
Gamblor
21st Jan 2000, 11:15 AM
Thx, Beavis. Ill just replace all the insta-hit weps with others (minigun and enforcer are not insta-hit, type iamtheone then playersonly and you will see the tracers in mid air)
Thats one step closer to my matrix style dodge bullets item... hehe
[NBK]Beavis
21st Jan 2000, 05:18 PM
The minigun and enforce ARE instant hit weapons. What you see on the screen is an ANIMATION, not a projectile. Here's the logic when you fire a projectile weapon...
function fire
{
spawn( projectile.projectile_name)
}
a new actor is added to the world that takes care of its own animation in this case. And this new actor (a projectile) will cause damage to whatever it touches.
a instant hit weapon on the other hand does this...
function fire
{
did we hit anything? if so then make that actor takedamage (actor could be anything, person, bot, wall)
spawn (animation)
}
Some instant hit weapons do not spawn an animation every time, for example the minigun which uses a randomize function to determine if to spawn (gives the tracer effect). Others do one everytime, like the shock rifle primary.
So even when you see the shock rifle primary bolt flying across the screen and taking seconds to traverse a big map, the code already determined if it hit anything the moment of firing. What you see is the after effect animation.
If you don't believe me, try to find a bullet projectile class under classes/actor/projectile. Better yet, look at the UT weapon scripts and see the difference between a projectile weapon like the rocket launcher, and a instant hit weapon like the sniper rifle.
{NBK}Beavis
Wanderer
21st Jan 2000, 06:22 PM
Actually with the Minigun a tracer pops out every 5 or so shots. I guess it helps locate the guy when you're being shot at by one. As if the flash isn't big enough /~unreal/ubb/html/wink.gif
vBulletin® v3.8.0 Release Candidate 2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.