Hi, it appears to me that I'm more stupid than I thought (Again), but here my problem ,ill put all the stuff on the table for you:
#include "zcommon.acs"
script 698 (void) {
int MechType = 1;
if (CheckInventory ("FirebatWeapons")) MechType = 1;
}
int x = GetActorX(0);
int y = GetActorY(0);
int z = GetActorZ(0);
int angle = GetActorAngle (ActivatorTID ());
case 1:
// Firebat
if(GetActorProperty(0,APROP_Health) >= 1000)
Spawn ("EjectedRaven", x, y, z, 0, angle);
else
Spawn ("DamagedRaven", x, y, z, 0, angle);
break;
}
somewhy it tell me the following errors:
Syntax error in constant expression.
Missiing semicolon.
But this is a ripped off code, where I just removed what I didnt need, so how can it not Work? :V
Help with some basic ACS :V
Help with some basic ACS :V
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there
-
Ijon Tichy
- Frequent Poster Miles card holder
- Posts: 901
- Joined: Mon Jun 04, 2012 5:07 am
RE: Help with some basic ACS :V
first off, use [ code ]
second off, where the hell is your switch block
second off, where the hell is your switch block
RE: Help with some basic ACS :V
well, the what? I think I removed the thing?...
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there
RE: Help with some basic ACS :V
I don't really get what u want with ur code but I changed it to make atleast a little sense:
(sorry that i pasted code like text im not really familiar with the zan forums when it comes to code blocks)
#include "zcommon.acs"
script 698 (void)
{
int MechType = 1;
int x = GetActorX(0);
int y = GetActorY(0);
int z = GetActorZ(0);
int angle = GetActorAngle (ActivatorTID ());
if(CheckInventory ("FirebatWeapons")) == (vaulue of the firevatweapon, could be one to check if he has it dunno what u want :V) && MechType = 1)
{
switch(\\add this ureself)
{
case 1:
// Firebat
{
if(GetActorProperty(0,APROP_Health) >= 1000)
{
Spawn ("EjectedRaven", x, y, z, 0, angle);
}
else
{
Spawn ("DamagedRaven", x, y, z, 0, angle);
break;
}
}
}
}
If u still can't figure it out than u can always contact me on irc, i can be found in #zandronum with the same name as here :P
Anyways Good Luck!
(sorry that i pasted code like text im not really familiar with the zan forums when it comes to code blocks)
#include "zcommon.acs"
script 698 (void)
{
int MechType = 1;
int x = GetActorX(0);
int y = GetActorY(0);
int z = GetActorZ(0);
int angle = GetActorAngle (ActivatorTID ());
if(CheckInventory ("FirebatWeapons")) == (vaulue of the firevatweapon, could be one to check if he has it dunno what u want :V) && MechType = 1)
{
switch(\\add this ureself)
{
case 1:
// Firebat
{
if(GetActorProperty(0,APROP_Health) >= 1000)
{
Spawn ("EjectedRaven", x, y, z, 0, angle);
}
else
{
Spawn ("DamagedRaven", x, y, z, 0, angle);
break;
}
}
}
}
If u still can't figure it out than u can always contact me on irc, i can be found in #zandronum with the same name as here :P
Anyways Good Luck!
Last edited by xrgman on Wed Apr 03, 2013 8:36 pm, edited 1 time in total.
- ibm5155
- Addicted to Zandronum
- Posts: 1641
- Joined: Tue Jun 05, 2012 9:32 pm
- Location: Somewhere, over the rainbow
RE: Help with some basic ACS :V
Code: Select all
#include "zcommon.acs"
script 698 (void) {
int MechType = 1;
if (CheckInventory ("FirebatWeapons")) MechType = 1;//if the if is true it´ll only execute mechtype=1
// This guy '}' is closing the script and the rest is not inside of script 698
int x = GetActorX(0);
int y = GetActorY(0);
int z = GetActorZ(0);
int angle = GetActorAngle (ActivatorTID ());
//I think some switch should be here
switch(angle)//New switch, because there wasn´t one
{//add
case 1: //Cases require switches to work
// Firebat
if(GetActorProperty(0,APROP_Health) >= 1000)
Spawn ("EjectedRaven", x, y, z, 0, angle);
else
Spawn ("DamagedRaven", x, y, z, 0, angle);
break;
//add a '}' here to close the switch case
}
}//Need a new one because the up was closing the switch one
EDIT: this didn´t worked because when you removed some parts you should have removed somethings that should stayed on the code xD
Last edited by ibm5155 on Wed Apr 03, 2013 9:08 pm, edited 1 time in total.
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!
<this post is proof of "Decline">
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!
<this post is proof of "Decline">
RE: Help with some basic ACS :V
Thank you all, you have really helped this noob out :P
This is an eject script for a custom aow mech, wich I'll have to change a bit to give a custom eject item instead of the usual one, but Again, thank you :D
EDIT: Just noticed that the script refuse to Work, I got it in a LOADACS lump, wich loads the acs file, but if I activate teh script in any way, nothing happens :V
This is an eject script for a custom aow mech, wich I'll have to change a bit to give a custom eject item instead of the usual one, but Again, thank you :D
EDIT: Just noticed that the script refuse to Work, I got it in a LOADACS lump, wich loads the acs file, but if I activate teh script in any way, nothing happens :V
Last edited by Lollipop on Thu Apr 04, 2013 8:31 am, edited 1 time in total.
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there