Severed bunny head
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > Doom Builder > ACS not working
 
Author
All times are GMT. The time now is 16:46. Post New Thread    Post A Reply
.:=JshPuppy=:.
Newbie


Posts: 8
Registered: 07-10


Hey, I'm new to DoomWorld, but I'm also on ST. I thought posting here would be better, because this is generally a larger forum.

Okay, I'm having an ACS problem. I'm making a monster spawn room, but some of it is not working.

I made it so that when you bump into a line in front of a switch, it displays the name of the monster.
What I don't get, is why the first one isn't working. It won't display "Zombiemen". I have no idea what's wrong.

I can assure you the linedef properties are correct. (Quadruple checked them.)

Here's the code for the bumping-into line. (sorry about the huge amount of text)

code:
Script 15 (int MessageID) { if(messageID == 1) { print(s:"Zombiemen"); } if(messageID == 2) { print(s:"Shotgunguys"); } if(messageID == 3) { print(s:"Chaingun guys"); } if(messageID == 4) { print(s:"Imps"); } if(messageID == 5) { print(s:"Dark imps"); } if(messageID == 6) { print(s:"Demons"); } if(messageID == 7) { print(s:"Spectres"); } if(messageID == 8) { print(s:"Cacodemons"); } if(messageID == 9) { print(s:"Cacolanterns"); } if(messageID == 10) { print(s:"Pain elementals"); } if(messageID == 11) { print(s:"Lost Souls"); } if(messageID == 12) { print(s:"Hell knights"); } if(messageID == 13) { print(s:"Abaddons"); } if(messageID == 14) { print(s:"Barons of hell"); } if(messageID == 15) { print(s:"Arachnotrons"); } if(messageID == 16) { print(s:"Revenants"); } if(messageID == 17) { print(s:"Mancubus"); } if(messageID == 18) { print(s:"NAZIS :D"); } }


...And here is the spawning code. This one is activated when the player "uses" the switch.

(The first command for all of them (Ceiling lower to lowest) isn't working!!! Why won't it work!?)

code:
Script 16 (int MessageID) { if(messageID == 1) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Zombiemen \cgSpawned"); SpawnSpot("Zombieman",54,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 2) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Shotgunguys \cgSpawned"); SpawnSpot("Shotgunguy",54,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 3) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Chaingun guys \cgSpawned"); SpawnSpot("Chaingunguy",54,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 4) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Imps \cgSpawned"); SpawnSpot("DoomImp",54,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 5) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"DarkImps \cgSpawned"); SpawnSpot("Darkimp",54,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 6) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Demons \cgSpawned"); SpawnSpot("Demon",54,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 7) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Spectres \cgSpawned"); SpawnSpot("Spectre",54,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 8) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Cacodemons \cgSpawned"); SpawnSpot("Cacodemon",54,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 9) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Cacolanterns \cgSpawned"); SpawnSpot("Cacolantern",54,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 10) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Pain elementals \cgSpawned"); SpawnSpot("Painelemental",55,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 11) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Lost souls \cgSpawned"); SpawnSpot("LostSoul",54,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 12) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Hell knights \cgSpawned"); SpawnSpot("Hellknight",55,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 13) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Abaddons \cgSpawned"); SpawnSpot("Abaddon",54,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 14) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Barons of hell \cgSpawned"); SpawnSpot("Baronofhell",55,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 15) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Arachnotrons \cgSpawned"); SpawnSpot("Arachnotron",55,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 16) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Revenants \cgSpawned"); SpawnSpot("Revenant",55,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 17) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"Mancubus \cgSpawned"); SpawnSpot("Fatso",55,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 18) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); print(s:"NAZI INVASION :D"); SpawnSpot("wolfensteinSS",54,51,90); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } if(messageID == 19) { Ceiling_lowerToLowest(58,100); TeleportInSector (50, 54, 56, 1, 0); Delay(35); Print(s:"Monster room clean"); Thing_remove(51); FloorAndCeiling_RaiseByValue (58, 100, 256); Delay(35); Floor_Lowertolowest(58,100); Delay(35); } }


... So what the Hell is wrong? I just don't get it...


~[JP]

Old Post 07-16-10 22:54 #
.:=JshPuppy=:. is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Edward850
Member


Posts: 424
Registered: 08-07


Puke the script to see if the script itself works. (In the console, type 'puke 15 5' or something to that effect. 15 being the script number and 5 being an arg, in this case, for int messageID.)

Old Post 07-16-10 23:08 #
Edward850 is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
.:=JshPuppy=:.
Newbie


Posts: 8
Registered: 07-10


No, well, you see, it *Works*, just not on all of them. The first script works, but the zombieman and abaddon text don't show up. The rest of them do. For the second script, the first command for each doesn't work. Again, the rest does.

So I'm not quite sure what's wrong here... I assure you there is no startscript error.

Old Post 07-16-10 23:15 #
.:=JshPuppy=:. is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
TheDarkArchon
Senior Member


Posts: 2332
Registered: 08-04


This code is extremely redundant. A switch block (bottom of the page) would be more suitable in the 2nd case, where as an array would be better for the first case.

For example, the first case would be this:
code:
str monsternames[18]={"Zombiemen","Shotgun Guys","Chaingun Guys","Imps","Dark Imps","Demons","Spectres","Cacodemons", "Cacolanterns","Pain Elementals","Lost Souls","Hell Knights","Abaddons","Barons of Hell","Arachnotrons","Revenants", "Mancubii","NAZIS :D"}; Script 15 (int MessageID) { print(s:monsternames[MessageID--]); }


instead of the mess you have at the moment. As for the problem about the script not working, it appears to be map based rather than script based as from what I can see, it should work. Double check arguments and tags.

Old Post 07-17-10 00:19 #
TheDarkArchon is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
.:=JshPuppy=:.
Newbie


Posts: 8
Registered: 07-10


Okay... This is really weird. I tried that new script, (Much simpler, thank you!) however, a new really WEIRD problem comes up. Not only does it not fix the real problem, it causes a weird bug. At the last one (18) It is supposed to display "NAZIS :D", but in the map test, it displays "CAMTX128". WTF.

I am starting to suspect that an earlier ACS script of mine was faulty, but then, how can Doom Builder not find these problems? How can it test the map when there are ACS problems?

This is almost a new entire question...

Old Post 07-25-10 06:48 #
.:=JshPuppy=:. is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
XAwful
Warming Up


Posts: 17
Registered: 01-10


Do you have any camera scripts? If DB is still testing it correctly, then the ACS scripts might be messing each other up. Is there anything else using that variable?

And, what exactly isn't working? The ceiling change, right?

Old Post 08-05-10 05:07 #
XAwful is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
.:=JshPuppy=:.
Newbie


Posts: 8
Registered: 07-10


Hmm... Do I know you? Are you... you... Alsch?

Well, in any case, yes, there is a camera script. It displays fine though, and there is nothing wrong with the script.

code:
SetCameraToTexture(19,"CAMTX128",95);


No, there is nothing using the one variable that I have just acquired.

And yes, the ceiling will not lower down. It is being a b*tch.

Old Post 08-05-10 05:31 #
.:=JshPuppy=:. is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
XAwful
Warming Up


Posts: 17
Registered: 01-10


I assure you, I haven't the slightest clue what this "Alsch" is.


And check the line that has the camera texture on it. Is the variable right?

Old Post 08-05-10 05:34 #
XAwful is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
.:=JshPuppy=:.
Newbie


Posts: 8
Registered: 07-10


No, there is nothing wrong with the camera thing. I still just think DB2 is messed up for me. Here is another example that I just ran into:

Okay, here is another script that has 0 problems. DoomBuilder thinks that there IS a problem.

code:
script 128 (Int MessageID) { if(messageID == 1) { UnMorphActor(0); giveinventory("JustUnmorphed",1); delay(3); takeinventory("JustUnmorphed",1); } if(messageID == 2) { <-***WTF THERES NOTHING WRONG*** if(Checkinventory("IsNinja") = 1) { if(Checkinventory("Dontwantkatanaspec") = 0) { print(s:"Disabled the Katana special attack"); giveinventory("Dontwantkatanaspec",1); } Else { print(s:"Enabled the Katana special attack"); takeinventory("Dontwantkatanaspec",1); } } Else { print(s:"Nice try, man. You're not a \cgNinja\c-."); } } }


It says there is a problem on line 32 (which is line 11 here, marked with the asterisks)

It says I'm missing a ')'. WTF.

And let me clear something out first. I did do the # include zcommon.acs thing. This script is part of my LOADACS lump, so I can use this script on every map.

Here is my complete ACS script (to be loaded on every map):

code:
#library "JP_REL" #include "zcommon.acs" script 125 (void) { giveinventory("Rkey",1); delay(2); takeinventory("Rkey",1); } script 126 (void) { giveinventory("Kkey",1); delay(2); takeinventory("Kkey",1); } script 127 (void) { giveinventory("Gkey",1); delay(2); takeinventory("Gkey",1); } script 128 (Int MessageID) { if(messageID == 1) { UnMorphActor(0); giveinventory("JustUnmorphed",1); delay(3); takeinventory("JustUnmorphed",1); } if(messageID == 2) { if(Checkinventory("IsNinja") = 1) { if(Checkinventory("Dontwantkatanaspec") = 0) { print(s:"Disabled the Katana special attack"); giveinventory("Dontwantkatanaspec",1); } Else { print(s:"Enabled the Katana special attack"); takeinventory("Dontwantkatanaspec",1); } } Else { print(s:"Nice try, man. You're not a \cgNinja\c-."); } } }



So I see nothing wrong. But DB2 says there is something wrong. Who's right, and what's wrong!??

__________________
[I'm also on ST!]

All your base are still belong to us.

Old Post 08-08-10 03:35 #
.:=JshPuppy=:. is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
XAwful
Warming Up


Posts: 17
Registered: 01-10


Oh, that happened to me a lot of times. It's the ")" right before the "2" that it's not recognizing.

Old Post 08-08-10 03:40 #
XAwful is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
.:=JshPuppy=:.
Newbie


Posts: 8
Registered: 07-10


Sooooo.... What do I do?

__________________
[I'm also on ST!]

All your base are still belong to us.

Old Post 08-08-10 03:58 #
.:=JshPuppy=:. is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
boris
meow


Posts: 3630
Registered: 05-00




if(Checkinventory("IsNinja") = 1)

if(Checkinventory("Dontwantkatanaspec") = 0)


You're not checking for equality here (as you intended), but you try to assing a value.

Old Post 08-08-10 10:55 #
boris is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
.:=JshPuppy=:.
Newbie


Posts: 8
Registered: 07-10


Umm, I don't understand. I want the ACS script to check if the player has the inventory item. If it returns 1 (true), it will match 1. Interpreting the script I made:

If doomplayer has "IsNinja", execute the following.
If doomplayer has "Dontwantkatanaspec", execute the following.

You see? I'm not quite sure what I should do.

Old Post 08-08-10 19:52 #
.:=JshPuppy=:. is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
boris
meow


Posts: 3630
Registered: 05-00


A single '=' is used to assing a value to a variable. If you check for equality you have to use two '=', i.e. '==' (as you already did a lolzillion times in the rest of your script.

So you have to write

if(Checkinventory("IsNinja") == 1)

and

if(Checkinventory("Dontwantkatanaspec") == 0)

Old Post 08-08-10 19:58 #
boris is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 16:46. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > Doom Builder > ACS not working

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.