Foodles Posted October 8, 2010 I'm trying to add an effect to a sector with scripting but I'm not sure how, e.g. I want to make a sector that lowers into some lava and when it reaches the lava level the floor will change flat and the sector will then become instant death, I had a look on the wiki but I couldnt find anything. Im using ZDOOM btw. 0 Share this post Link to post
EarthQuake Posted October 8, 2010 Well, it's just a matter of finding the right ACS functions and specials to alter the sectors in question. For your scenario, you'll want to use something like this: Script 1 (int Tag, int Speed) { Floor_LowerToLowest(Tag, Speed); // Lower sector. TagWait(Tag); // Wait for sector to stop lowering. ChangeFloor(Tag, "LAVA1"); // Change floor texture. Sector_SetDamage(Tag, 10000, MOD_LAVA); // Assign damage to sector. }This script will lower a sector's floor to the lowest adjacent sector, which will we assume is instant-kill lava. The floor will change to lava and the sector damage will be applied to it, only after the sector has finished lowering. To call this script, you need to supply two arguments in your map editor: the tag of the sector to lower, and how fast you want it to lower. I'll assume you're also using "LAVA1" as your lava flat textures. Of course you can change anything in the script to customize it to your liking. The idea is that a script is broken down into specific steps and you have to combine action specials to usually get where you want to go. You can make things more flexible by defining arguments and using them in your code like variables. Notice how all of the specials/functions make use of the "Tag" argument. If you do this, you can specify the tag and speed in the map itself, and reuse it on as many sectors as you wish, without actually having to write a new script for each area where you want a floor to drop into lava. 0 Share this post Link to post
Foodles Posted October 9, 2010 Sector_SetDamage is what I was looking for, thanks for the advice as well. 0 Share this post Link to post