thisbecasper, on 17 October 2017 - 12:05 PM, said:
Where you have
ifvarl SHOTGUNAMMO 10
you should be able to replace it with
ifvarl player[THISACTOR].ammo_amount 2 10
thisbecasper, on 17 October 2017 - 12:05 PM, said:
ifvarl SHOTGUNAMMO 10
ifvarl player[THISACTOR].ammo_amount 2 10
thisbecasper, on 17 October 2017 - 12:05 PM, said:
definegamefuncname 36 Switch_Weapon_Function
gamevar temp 0 0
gamevar subweapon_choice 0 1
onevent EVENT_TURNAROUND
setvar RETURN -1
getplayer[THISACTOR].curr_weapon temp
ifvare temp 2
{
ifvare subweapon_choice 0
{
ifvarl SHOTGUNAMMO 10
{
quote 36
break
}
setvar subweapon_choice 1
sound SELECT_WEAPON
setvar WEAPON2_SHOOTS 1092
setvar WEAPON2_SHOTSPERBURST 10
setvar WEAPON2_FIRESOUND PISTOL_RICOCHET
setvar WEAPON2_FLAGS 17472
quote 34
}
else
{
setvar subweapon_choice 0
sound SHOTGUN_COCK
setvar WEAPON2_SHOOTS SHOTGUN
setvar WEAPON2_SHOTSPERBURST 7
setvar WEAPON2_FIRESOUND SHOTGUN_FIRE
setvar WEAPON2_FLAGS 1024
quote 35
}
}
endevent
onevent EVENT_DOFIRE
getplayer[THISACTOR].curr_weapon temp
ifvare temp 2
{
ifvare subweapon_choice 1
{
getplayer[THISACTOR].ammo_amount SHOTGUN_WEAPON temp
ifvarl temp 10
{
setvar subweapon_choice 0
sound SHOTGUN_COCK
setvar WEAPON2_SHOOTS SHOTGUN
setvar WEAPON2_SHOTSPERBURST 7
setvar WEAPON2_FIRESOUND SHOTGUN_FIRE
setvar WEAPON2_FLAGS 1024
quote 40
}
}
}
endevent
Trooper Dan, on 17 October 2017 - 12:11 PM, said:
ifvarl SHOTGUNAMMO 10
ifvarl player[THISACTOR].ammo_amount 2 10
Hendricks266, on 17 October 2017 - 12:15 PM, said:
Trooper Dan, on 17 October 2017 - 12:31 PM, said:
Hendricks266, on 17 October 2017 - 12:15 PM, said:
definegamefuncname 36 Switch_Weapon_Function
gamevar temp 0 0
gamevar subweapon_choice 0 1
onevent EVENT_TURNAROUND
setvar RETURN -1
getplayer[THISACTOR].curr_weapon temp
ifvare temp 2
{
ifvare subweapon_choice 0
{
ifvarl SHOTGUNAMMO 10
{
quote 36
break
}
setvar subweapon_choice 1
sound SELECT_WEAPON
setvar WEAPON2_SHOOTS 1092
setvar WEAPON2_SHOTSPERBURST 10
setvar WEAPON2_FIRESOUND PISTOL_RICOCHET
setvar WEAPON2_FLAGS 17472
quote 34
}
else
{
setvar subweapon_choice 0
sound SHOTGUN_COCK
setvar WEAPON2_SHOOTS SHOTGUN
setvar WEAPON2_SHOTSPERBURST 7
setvar WEAPON2_FIRESOUND SHOTGUN_FIRE
setvar WEAPON2_FLAGS 1024
quote 35
}
}
endevent
onevent EVENT_DOFIRE
getplayer[THISACTOR].curr_weapon temp
ifvare temp 2
{
ifvare subweapon_choice 1
{
getplayer[THISACTOR].ammo_amount SHOTGUN_WEAPON temp
ifvarl temp 10
{
setvar subweapon_choice 0
sound SHOTGUN_COCK
setvar WEAPON2_SHOOTS SHOTGUN
setvar WEAPON2_SHOTSPERBURST 7
setvar WEAPON2_FIRESOUND SHOTGUN_FIRE
setvar WEAPON2_FLAGS 1024
quote 40
}
}
}
endeventThis post has been edited by thisbecasper: 17 October 2017 - 01:02 PM
Hendricks266, on 17 October 2017 - 12:35 PM, said:
This post has been edited by Fox: 17 October 2017 - 01:01 PM
thisbecasper, on 17 October 2017 - 07:48 PM, said:
Trooper Dan, on 17 October 2017 - 11:05 PM, said:
thisbecasper, on 18 October 2017 - 01:35 AM, said:
gamevar killcount 0 0
gamevar temp 0 0
state getkillcount
getplayer[THISACTOR].frag killcount
getplayer[THISACTOR].fraggedself temp
subvarvar killcount temp
endsHendricks266, on 18 October 2017 - 10:31 AM, said:
Hendricks266, on 18 October 2017 - 10:31 AM, said:
gamevar killcount 0 0
gamevar temp 0 0
state getkillcount
getplayer[THISACTOR].frag killcount
getplayer[THISACTOR].fraggedself temp
subvarvar killcount temp
endsThis post has been edited by thisbecasper: 18 October 2017 - 03:32 PM
thisbecasper, on 19 October 2017 - 10:42 AM, said:
This post has been edited by thisbecasper: 19 October 2017 - 12:08 PM
thisbecasper, on 19 October 2017 - 12:04 PM, said:
Fox, on 05 August 2009 - 06:38 AM, said:
Fox, on 19 October 2017 - 02:12 PM, said:
gamevar killer 0 1
actor APLAYER ...
(...)
ifdead
{
getplayer[THISACTOR].wackedbyactor killer
setplayer[killer].max_ammo_amount 4 60
ifdead
{
getplayer[THISACTOR].wackedbyactor temp
getactor[temp].picnum temp2
ifvare temp2 APLAYER
{
getactor[temp].yvel temp2
setplayer[temp2].max_ammo_amount RPG_WEAPON 60
}
Hendricks266, on 19 October 2017 - 04:43 PM, said:
ifdead
{
getplayer[THISACTOR].wackedbyactor temp
getactor[temp].picnum temp2
ifvare temp2 APLAYER
{
getactor[temp].yvel temp2
setplayer[temp2].max_ammo_amount RPG_WEAPON 60
}
ifdead
{
getplayer[THISACTOR].wackedbyactor killer
getactor[killer].picnum tempkiller
ifvare tempkiller APLAYER
{
getactor[killer].yvel tempkiller
addvar rpgammo 10
setplayer[tempkiller].max_ammo_amount RPG_WEAPON rpgammo
}
This post has been edited by thisbecasper: 20 October 2017 - 02:17 AM
Trooper Dan, on 20 October 2017 - 10:02 AM, said:
state updatevalue
{
getplayer[THISACTOR].wackedbyactor killer
getactor[killer].picnum tempkiller
ifvare tempkiller APLAYER
{
ifhitweapon
{
addvar rpgsammo 10
}
getactor[killer].yvel tempkiller
setplayer[tempkiller].max_ammo_amount RPG_WEAPON rpgsammo
}
}
ends
---
ifdead
{
state updatevalue
This post has been edited by thisbecasper: 20 October 2017 - 02:17 PM
state updatevalue
getplayer[THISACTOR].wackedbyactor killer
getactor[killer].picnum tempkiller
ifvare tempkiller APLAYER
{
addvar rpgsammo 10
getactor[killer].yvel tempkiller
setplayer[tempkiller].max_ammo_amount RPG_WEAPON rpgsammo
}
endsifhitweapon
{
ifdead
{
state updatevalue