I no this but it's one of them brain fart days and I can't for the life of we figure it out. what im wanting is a
if curweapon is blah
do blah
else if curweapon is blah2
do blah2
sorry for asking such a dumb question but hey

Code: Select all
script 123 (void)
{
if(CheckWeapon("Shotgun")==1)
{
do this
}
if(CheckWeapon("PlasmaRifle")==1)
{
do that
}
if(CheckWeapon("RocketLauncher")==1)
{
blow stuff up
}
}
Code: Select all
Script 1 (void) {
If(CheckWeapon("Shotgun")) {
action;
}
Else {
If(CheckWeapon("PlasmaRifle")) {
action;
}
Else {
If(CheckWeapon("RocketLauncher")) {
action;
}
}
}
}
Code: Select all
Script 1 (void) {
If(cat1 == 1) {
action;
}
If(cat2 == 1) {
action;
}
If(cat3 == 1) {
action;
}
}
Code: Select all
Script 1 (void) {
If(cat1 == 1) {
action;
}
Else {
If(cat2 == 1) {
action;
}
Else {
If(cat3 == 1) {
action;
}
}
}
}
You are using a lot of surplus brackets. This is equivilent:Wasted Youth wrote:This would work:
Code: Select all
Script 1 (void) {
If(CheckWeapon("Shotgun")) {
action;
}
Else If(CheckWeapon("PlasmaRifle")) {
action;
}
Else If(CheckWeapon("RocketLauncher")) {
action;
}
}