TimeOfDeath Posted July 6, 2012 #include "zcommon.acs" script 1 open {acs_execute(2,0,0,0,0);} script 2 (void) {clearinventory(); giveinventory("chainsaw",1); setactorproperty(0,APROP_health,50);}How do I make setactorproperty work with an open script? I can make it work when the player activates the script, but not immediately when the map starts. It's for a single player wad and I want to set the player's health at the start of every map. 0 Share this post Link to post
gggmork Posted July 7, 2012 I only messed with it a little bit but this seemed to work (enter instead of open, read yellow box here: http://zdoom.org/wiki/Script_types ): #include "zcommon.acs" script 2 enter {clearinventory(); giveinventory("chainsaw",1); setactorproperty(0,APROP_health,50);} 0 Share this post Link to post
TimeOfDeath Posted July 8, 2012 New question: is it possible to keep track of the total time (including the time spent on incomplete attempts) over the course of many maps? Say there are 100 maps, you start on map01 and the time starts, but if you die on map25 then the total timer restarts (the time on the bottom of the intermission screen). How do you keep track of the total time if you die? (of all attempts, not only the completed map attempts) 0 Share this post Link to post
Kore Posted July 8, 2012 TimeOfDeath said:New question: is it possible to keep track of the total time, including deaths, over the course of many maps? I'm not sure about the total time problem, but if you want to keep track of the total deaths, I guess you can use a global scope, for example:#include "zcommon.acs" global int 1:deathcount; script 32 DEATH { deathcount++; } You can read more about it in: http://zdoom.org/wiki/Scope http://zdoom.org/wiki/Script_types 0 Share this post Link to post
gggmork Posted August 20, 2012 I stumbled on this page: http://zdoom.org/wiki/Scope Only briefly skimmed it, but seems you can create a global variable, like a timer, that spans multiple maps that way. 0 Share this post Link to post