[Added] A_SpawnItemEx TID flags

Moderator: Developers

Re: A_SpawnItemEx TID flags

Postby Major Cooke » Wed Mar 21, 2012 9:27 am

I've got a question...

Code: Select allExpand view
Script 250 (void) // Plasma Gun
{
Thing_remove(250);
delay(10);
Thing_SpawnNoFog(10, T_CHAINGUY, 0, 402);
SetActorProperty(402, APROP_Health, (GetActorProperty(402, APROP_Health))*10);
delay(35*15);
Thing_SpawnNoFog(10, T_CHAINGUY, 0, 402);
SetActorProperty(402, APROP_Health, (GetActorProperty(402, APROP_Health))*10);
}


Code: Select allExpand view
Actor ZombieReplacerMod replaces Zombieman
{
   var int user_Type;
   Monster
   +NONSHOOTABLE
   -SHOOTABLE
   +NOINTERACTION
   -COUNTKILL
   States
   {
   Spawn:
      TNT1 A 0
   Aliens:
   TNT1 a 0 A_Jump(256,"Al01","Al02","Al03","Al04")
   Al01:   TNT1 A 0 A_SpawnItemEx("Alien1",0,0,0,0,0,0,0,SXF_TRANSFERTID|SXF_LOSETID|SXF_SETMASTER|SXF_NOCHECKPOSITION|SXF_TRANSFERAMBUSHFLAG)   Goto End
   Al02:   TNT1 A 0 A_SpawnItemEx("Alien2",0,0,0,0,0,0,0,SXF_TRANSFERTID|SXF_LOSETID|SXF_SETMASTER|SXF_NOCHECKPOSITION|SXF_TRANSFERAMBUSHFLAG)   Goto End
   Al03:   TNT1 A 0 A_SpawnItemEx("Alien3",0,0,0,0,0,0,0,SXF_TRANSFERTID|SXF_LOSETID|SXF_SETMASTER|SXF_NOCHECKPOSITION|SXF_TRANSFERAMBUSHFLAG)   Goto End
   Al04:   TNT1 A 0 A_SpawnItemEx("Alien4",0,0,0,0,0,0,0,SXF_TRANSFERTID|SXF_LOSETID|SXF_SETMASTER|SXF_NOCHECKPOSITION|SXF_TRANSFERAMBUSHFLAG)   Goto End
.....


If I read properly somewhere, or someone told me, DECORATE usually has the last say as far as execution order goes, am I right? So would this method work or would I need to add a Delay(1) in the ACS script?

I want to spawn the monster immediately with the TID, and have it's health changed instead of the spawner itself. I take it that'd be the best assurance method?
User avatar
Major Cooke
That's how my uncle stole christmas three times in a row in a single year. -DBT
 
Joined: 28 Jan 2007

Re: A_SpawnItemEx TID flags

Postby FDARI » Thu Mar 22, 2012 7:45 am

Last time I asked, checked or anything like that, I think the ACS-thinker was the last event on a tick, but I could be wrong. However... I don't really see what you're trying to do. Do you launch script 250 in the end-state? If you want an ACS-operation to start immediately, the "ExecuteWithResult"-variant is for you.

Or.... Are you trying to run script 250 to change some stuff, and wanting the whole script to complete before decorate kicks in? Decorate processing does not start when the actor is spawned, but the next time the thinker runs, and you're in the ACS-thinker at the moment, so you should be home-free. You can kickstart it with SetActorState(), as that forces normal state-processing on the state you set until the first greater-than-0-duration frame.

You can run print statements and logs to check.
User avatar
FDARI
Bronies eunt domus
 
Joined: 03 Nov 2009

Re: A_SpawnItemEx TID flags

Postby FDARI » Sun Apr 15, 2012 7:15 am

SXF_TRANSFERSCALE (viewtopic.php?f=34&t=30623&p=579867#p579867) included in new submission. Untested as of right now.
User avatar
FDARI
Bronies eunt domus
 
Joined: 03 Nov 2009

Re: A_SpawnItemEx TID flags

Postby Major Cooke » Tue Mar 19, 2013 12:35 pm

I'd say bump for great justice, because these are things I very much would like to have!
User avatar
Major Cooke
That's how my uncle stole christmas three times in a row in a single year. -DBT
 
Joined: 28 Jan 2007

Re: A_SpawnItemEx TID flags

Postby Xaser » Tue Mar 19, 2013 1:32 pm

The patch probably requires bumping the flag numbers since SXF_USEBLOODCOLOR has been added since submission, but that's probably the easiest possible edit anyhow. ;)
User avatar
Xaser
secretly a supercomputer being a government
 
Joined: 20 Jul 2003
Location: .plɹoʍɹǝʌǝu.

Re: A_SpawnItemEx TID flags

Postby Major Cooke » Tue Mar 19, 2013 5:57 pm

Indeed. Unlike some of the other code submissions, I have reason to believe this is still compatible. I just hope FDARI's willing to update the rest, those are some good decorate functions I can use.
User avatar
Major Cooke
That's how my uncle stole christmas three times in a row in a single year. -DBT
 
Joined: 28 Jan 2007

Re: A_SpawnItemEx TID flags

Postby randi » Tue Mar 19, 2013 10:08 pm

Added in r4188.
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003

Previous

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests