Re: ZScript Discussion
Posted: Mon Jan 30, 2017 5:42 pm
so can I request clientside scripts from zandronum into zdoom please? 

Code: Select all
DeadThingsLister lister = EventHandler.Find('DeadThingsLister');
// pick random dead thing from lister.DeadThings array
First, you must establish a relationship between the spawner and the spawnee (eg the player and the particle, respectively). Either store the spawner in a pointer -or- make an actor variable have a valid reference to it -or- whatever else that works for you.Major Cooke wrote: I too would love to hear more about this.
Code: Select all
class Z_Precipitation : Actor
{
// [snip]
override void Tick()
{
Super.Tick();
if (!tracer)
{
return;
}
// destroy precipitation from other players
if (tracer != null && tracer != players[consoleplayer].mo)
{
//bINVISIBLE = true;
Destroy();
}
}
}
Of course I do.ZZYZX wrote:modders that do care about demo and networking compatibility!
You can't make something persistent between maps in the savegame using event handlers.Nash wrote:Also, awesome work on your event handler system. I can't say I fully understand yet the entire concept and how to use it; but if it will let me replicate OPEN ACS scripts, and to do things like store quest variables and quest progress that remain persistent between maps - I'm stoked for it.
IDTS, use const for that.ibm5155 wrote:Does zscript support #defines ?
https://zdoom.org/wiki/MAPINFO/Editor_number_definitionibm5155 wrote:and where should I add the doomed number in my zscript code?
Event system kinda allows you to have global vars in the handler, but that's a hack and otherwise you have to create an actor, yes.ibm5155 wrote:EDIT:
And can I make global vars or I'm forced to create an actor where everyone has access to his vars?