Another Script Question

Post » Wed Feb 24, 2010 8:30 pm

I am trying to get the player to lose ap while fireing his or her weapon but for some reason when the player is attack the ap lose stops. Is there a diffent animation playing at that time or something I need to add to the script to make it work properly?


if (Player.IsWeaponOut == 1)	if(IsPlayerActionActive 3);Fireing Weapon		Player.DamageAV Actionpoints .5;Out side combat	endifendifif (Player.IsWeaponOut == 1)	if(Player.GetAttacked == 0)		if(IsPlayerActionActive 3);Fireing Weapon			Player.DamageAV Actionpoints .5;Out side combat		endif	endifendifif (Player.IsWeaponOut == 1)	if(Player.GetAttacked == 1)		if(IsPlayerActionActive 3);Fireing Weapon			Player.DamageAV Actionpoints .5;Don't work While in combat		endif	endifendif

User avatar
Cathrine Jack
 
Posts: 3329
Joined: Sat Dec 02, 2006 1:29 am

Post » Wed Feb 24, 2010 1:41 pm

If you look at the geck page for http://geck.gamesas.com/index.php/IsPlayerActionActive at the bottom it states the following:

Actions stay "active" based on either a timer or "stopping" the action. For example, "firing a weapon" remains active for about 2 minutes of game time after the weapon is fired, but Z keying and standing on furniture return false as soon as the activity is stopped.


I think this might have something to with why it doesn't work. Your script fires for 2 minutes once the player fires his weapon. >.>

Gunmaster95
User avatar
R.I.p MOmmy
 
Posts: 3463
Joined: Wed Sep 06, 2006 8:40 pm

Post » Wed Feb 24, 2010 8:30 pm

If you look at the geck page for http://geck.gamesas.com/index.php/IsPlayerActionActive at the bottom it states the following:



I think this might have something to with why it doesn't work. Your script fires for 2 minutes once the player fires his weapon. >.>

Gunmaster95


Ty didn't see that.
User avatar
meghan lock
 
Posts: 3451
Joined: Thu Jan 11, 2007 10:26 pm

Post » Wed Feb 24, 2010 5:31 pm

I also wanted to use this function recently for the same reason (checking if the player fired a weapon). I came to the conclusion that it doesn't work as expected, though it did for a couple of seconds. But after a while it always returned false / the active action was 0. My testing was not very thorough so maybe someone else can confirm this?
Anyway, in case you run into the same issue, you should try http://geck.gamesas.com/index.php/GetAnimAction.
User avatar
Glu Glu
 
Posts: 3352
Joined: Sun Apr 01, 2007 5:39 am


Return to Fallout 3