View Full Version : How do I access a function inside a Weapon's parent Vehicle?
03-18-2008, 09:40 AM
I am trying to script a small mutator for the ONSRV scorpion buggy and when I alt fire its weapon, it will continue firing forever.
I made a function in the modified Scorpion class that sets bWeaponIsAltFiring to True. That triggers the vehicle Weapon, which then starts firing indefinitely. I need a way to set the Vehicle's bWeaponIsAltFiring back to False, from inside the vehicle weapon so it only fires once..
Is that possible?
Oh, I'm running UT2004
03-18-2008, 08:11 PM
If this is in ut2004, it's suppose to be in the ut2004 section...
03-19-2008, 12:32 AM
I'd look around in the vehicle class and see if there is a firing function that you cna call instead of directly setting a variable.
I don't have the UT2004 source right now, but it's probably somethign along the lines of Fire() or StartFire().
The Scorpion's special altfire (the blades) is probably scripted in ONSRV rather than in its weapon. That may interfere with any altfire code you run in the weapon.
03-25-2008, 05:33 PM
I don't see how this relates to the title thread, but accessing a parent function would mean using Super.FunctionName();
03-25-2008, 06:56 PM
Not parent function, parent (i.e. Owner) Vehicle. That would be Vehicle(Owner).whatever or Vehicle(Instigator).whatever.
03-27-2008, 05:29 PM
Thanks all for the replies.
I was able to get it done just the way I needed it, but now I have come across a different problem.
I actually modified a version of the scorpion that is part of a gametype conversion mod for ut2004. This involved modifying the mod's .uc files and recompiling them, obtaining a new .u file, keeping the rest of the mod's files unchanged.
This means players have to manually download and replace the mod's .u and .ucl files each time they want to play in a server with the modified version, and replace back the originals when they want to play in a different server that does not have the modified version. This is very inconvenient to them, and leaves this conversion practically out of reach for regular players.
Is there an easier way around this, through in-game voting and automatically downloading off a redirect?
Thanks in advance
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.