Genki Posted February 21, 2015 I try to use acs to open a door: script 2 (void) { if (CheckInventory("BlueCard")) Door_Open (1, 16); Delay (35*5); Door_Close (1, 16); } else Print(s:"You need the blue key."); } Then the script editor says: invalid declarator - line 8 - the word "else". What should I the Newbie do? 0 Share this post Link to post
scifista42 Posted February 21, 2015 You are missing an opening curly bracket here: if (CheckInventory("BlueCard")) { By the way, better use ACS locked scripts than this workaround. They show as colours on the automap, which is convenient. 0 Share this post Link to post
Genki Posted February 21, 2015 Thank you very much, that worked. I'm new to this script stuff and will check out this "locked" tutorials for better understanding. 0 Share this post Link to post
Genki Posted February 24, 2015 on with new one. How do i make 3d floor that is deep-water and transparent in a map doom in hexen format? 0 Share this post Link to post
Du Mhan Yhu Posted February 24, 2015 saifi said:on with new one. How do i make 3d floor that is deep-water and translucent in a map doom in hexen format? http://zdoom.org/wiki/Sector_Set3dFloor 0 Share this post Link to post
Genki Posted February 24, 2015 tried it but didn't work. Sorry I'm a noob to this hexen format thing, so should i make a scipt or lindef action for that? script 2 OPEN { Sector_Set3dFloor(1, 3,64); } the editor says: function Set3dFloor is used but not defined. 0 Share this post Link to post
Du Mhan Yhu Posted February 24, 2015 saifi said:tried it but didn't work. Sorry I'm a noob to this hexen format thing, so should i make a scipt or lindef action for that? script 2 OPEN { Sector_Set3dFloor(1, 3,64); } the editor says: function Set3dFloor is used but not defined. Linedef action. Similar to 3d floors. http://i.imgur.com/Lu3hKMh.png ..And as you know, It will be as deep as the sector height. Make sure you uncheck "solid" Make sure to tag your 3d sector the same as the linedef action. 0 Share this post Link to post
Genki Posted February 24, 2015 Thank you very much for the help Du Mhan Yhu. It worked. 0 Share this post Link to post
scifista42 Posted February 24, 2015 saifi said:script 2 OPEN { Sector_Set3dFloor(1, 3,64); } the editor says: function Set3dFloor is used but not defined. It gave you an error because a script lump should start with a line: #include "zcommon.acs"If it didn't, the compiler would always complain, because it wouldn't know the functions you wanted to use; ZDoom functions are defined in "zcommon.acs". 0 Share this post Link to post
MaxED Posted February 24, 2015 That's true in general, but Sector_Set3dFloor and a couple of other action specials cannot be used in a script. 0 Share this post Link to post
scifista42 Posted February 24, 2015 Oh, alright then, thanks for the info. Now I remember where to look for usage info about Action Specials: http://zdoom.org/wiki/Action_specials 0 Share this post Link to post
Genki Posted February 24, 2015 Another one on the way... I just learnt how to make monsters appear via mapspots, but now i have a problem: script 4 (void) { SpawnSpot ("DoomImp", 1, 1); SpawnSpot ("TeleportFog", 1, 1); while(thingcount(0,1)>0) { delay(35); } Door_Open(6, 32); } the thing is the door which is tagged 6 doesn't really open. So i figured the script is wrong? what do you think? 0 Share this post Link to post
baja blast rd. Posted February 24, 2015 Give the summoned imps different thing IDs than the map spots; what's happening is that while(thingcount(0,1)>0) is counting the map spots. You can change while(thingcount(0,1)>0) to while(thingcount(T_IMP,1)>0) instead, but that's less flexible in general since you are limited to one type of monster. 0 Share this post Link to post
Genki Posted February 24, 2015 Alright, the door opens but i want to open after i kill the imps 0 Share this post Link to post
baja blast rd. Posted February 24, 2015 This works for me. #include "zcommon.acs" script 1 (void) { SpawnSpot ("DoomImp", 1, 2); SpawnSpot ("TeleportFog", 1, 1); while(thingcount(0,2)>0) delay(35); Door_Open(6, 32); } Here's a simple level demonstrating it in action: http://www.mediafire.com/download/gs758d57912ojy6/scriptdemo2.wad. 0 Share this post Link to post
Genki Posted February 25, 2015 rdwpa said:This works for me. Here's a simple level demonstrating it in action: http://www.mediafire.com/download/gs758d57912ojy6/scriptdemo2.wad. Thank you rdwpa for the demo, it's well explained. 0 Share this post Link to post