Page 1 of 1

True(er) secondary mode for weapons? (Overheat Event or eqv?

Posted: Fri Feb 09, 2007 10:32 pm
by Ace_Azzameen_5
Along this line of though, is there an event (or the equivalent:an "if get" check that can be performed by a looping 0.1 second timer) that can start a callback when a certain weapon is overheating or reloading?

So that we in theory could;

1.Notice that the player's or ai's(character) secondary mode pistol is overheating
2.Use the lua script to change that charcter's stats so that they no longer have the primary mode weapon
3.re-add the primary mode weapon once overheat is finished


Well, I posted this just in case anyone wants to try and smash together some kind of "LinkedUnitWeapons" script. . .

*Edit*
Clarification of intentions
1 unit, 2 weapons, 1 msh. One weapon represents the secondary fire mode of the other, as seen in "Geonosis:Incursion" with the clone commander.

So, say you fire the secondary mode weapon, the primary mode weapon is unavailable until the weapon has completely cooled (will settle for not overheated)
what he said vvvv

RE: True(er) secondary mode for weapons? (Overheat Event or

Posted: Sat Feb 10, 2007 4:04 pm
by phazon_elite
I think I understand what you're trying to do. Are you saying that when the secondary weapon overheats, the primary weapon gets removed, making it that you can't do anything while it's cooling down? Then, when it cools down, you can fire again, right? I haven't gone that far in LUA scripting, so I obviously can't help you on this one.

So the best thing I can do right now is make your intentions clear for people who don't understand.

- EP-000782

RE: True(er) secondary mode for weapons? (Overheat Event or

Posted: Sat Feb 10, 2007 10:01 pm
by [RDH]Zerted
Yes, please add smoe more details about why you want this. To me, it sounds like you just want the pistol to have a longer reload time. So, remove the overheat and increase the reload time.

Are you trying to get reloads to happpen the same way as SWBF1?

Looping for a short time throughout the entire map is not a good idea. The Lua is not designed for it and it has a good chance of slowing the server down. Events are designed to prevent these types of status checking loops. You can create custom events. Read the scripting system documentation guide or checkout the source code for the Holocron game mode.

RE: True(er) secondary mode for weapons? (Overheat Event or

Posted: Sat Feb 10, 2007 10:31 pm
by Ace_Azzameen_5
Ok, edited

@Zerted, check my ObjectRepair syntax, you know you want to.

Posted: Tue Mar 27, 2007 3:41 pm
by Ace_Azzameen_5
I don't get that. How do you create a new event for something in game that doesn't have an event, aren't events the only modder accessible communication from the c++ to the LUA?

Posted: Tue Mar 27, 2007 4:01 pm
by kajong
secondary modes: Let's say you have a gun with semi and automatic modes. When you shoot the 'automatic mode', (really a seperate gun from the semi)it overheats that mode. while it's overheated, you switch with 'semi mode' and it's still overheated, because they are, of course, the 'same weapon' :wink: ... am I right?