Russell_P Posted March 21, 2003 A ZDoom level I'm currently designing has a number of adjoining sectors, each of which undergoes a series of height changes when the player enters each respective sector. These height changes are made via scripting activated by a 'Sector Action' thing (Actor Enters Sector). Initially I set up a single 'generic' script and used the 'Sector Action' thing to pass that script values (tag, movement speed, etc). My problem occurs when the player enters a sector (and thus starts the script) and then leaves that sector and enters a second script activating sector. Because the script is still being executed on the first sector, it fails to have any effect on the second or sebsequent sectors until the script has finished running on the first. So my question is, ....is there anyway to activate mulitiple instances of a script so that each sector can use the same script immediately, reguardless of how many other sectors are using the same script? At the moment the only way I can achieve the effect I want is to have a SEPERATE script for each sector. This is both long winded, inefficient and messy. Any suggestions? :) 0 Share this post Link to post
Ultraviolet Posted March 21, 2003 You could have it increment/reset a variable which directs it to cycle through three different scripts, that way by the time it gets back around to using the first, it might be available again. 0 Share this post Link to post
Csabo Posted March 21, 2003 Use ACS_ExecuteAlways instead of ACS_Execute to run the script. This will allow multiple instances of the same script to be run - the solution to your problem. 0 Share this post Link to post
Russell_P Posted March 21, 2003 Ultraviolet said:You could have it increment/reset a variable which directs it to cycle through three different scripts, that way by the time it gets back around to using the first, it might be available again. Yeah I thought about doing something like that but it'd still be a bit messy. Csabo said:Use ACS_ExecuteAlways instead of ACS_Execute to run the script. This will allow multiple instances of the same script to be run - the solution to your problem. Perfect! Thanks. I should probably know about ACS_ExecuteAlways, but I'm a bit of a newbie to ZDoom scripting. I'll go try it now :) 0 Share this post Link to post