How do I start an ACS script from Decorate?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
lukas
Posts: 586
Joined: Sun Apr 04, 2010 10:37 am
Location: Belgrade, Serbia

How do I start an ACS script from Decorate?

Post by lukas »

How do I start an ACS script from Decorate? Can it be done with ACS_Execute? Cause I tried and it didn't work D= ...
User avatar
chopkinsca
Posts: 1325
Joined: Thu Dec 11, 2003 5:03 pm

Re: How do I start an ACS script from Decorate?

Post by chopkinsca »

lukas wrote:How do I start an ACS script from Decorate? Can it be done with ACS_Execute? Cause I tried and it didn't work D= ...
It should work. Post your code?
User avatar
lukas
Posts: 586
Joined: Sun Apr 04, 2010 10:37 am
Location: Belgrade, Serbia

Re: How do I start an ACS script from Decorate?

Post by lukas »

Code: Select all

actor SomeItemOrAnother : PowerupGiver
{
blablabla
  states
  {
  Spawn:
    TNT1 A 5
    loop
  Pickup:
    TNT1 A 5 ACS_Execute(50,0)
     stop
  }
}
This should work, right? But it doesn't...
User avatar
lukas
Posts: 586
Joined: Sun Apr 04, 2010 10:37 am
Location: Belgrade, Serbia

Re: How do I start an ACS script from Decorate?

Post by lukas »

Maybe it has something to do with the ACS code =S ?

Code: Select all

script 50 (void)
{
 faderange (255, 255, 255,1, 0, 0, 0, 0, 3.0);
}
Its for skulltag multiplayer, so maybe Fade is not working for right player...
User avatar
Cjk10000
Posts: 98
Joined: Fri Jan 02, 2009 10:13 am

Re: How do I start an ACS script from Decorate?

Post by Cjk10000 »

Code: Select all

actor SomeItemOrAnother : PowerupGiver
{
blablabla
  states
  {
  Spawn:
    TNT1 A 5
    loop
  Pickup:
    TNT1 A 5 faderange (255, 255, 255,1, 0, 0, 0, 0, 3.0) // I wonder if this would work?
    //TNT1 A 5 ACS_Execute(50,0)
     stop
  }
}
See coded out part above... I wonder if that can be called?
User avatar
chopkinsca
Posts: 1325
Joined: Thu Dec 11, 2003 5:03 pm

Re: How do I start an ACS script from Decorate?

Post by chopkinsca »

The monster is the activator so I assume it changes the fade for the monster, which does nothing.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: How do I start an ACS script from Decorate?

Post by NeuralStunner »

lukas wrote:

Code: Select all

 : PowerupGiver

Code: Select all

Pickup:
This will not work. Pickup states are only for [wiki=Classes:CustomInventory]CustomInventory[/wiki].
User avatar
lukas
Posts: 586
Joined: Sun Apr 04, 2010 10:37 am
Location: Belgrade, Serbia

Re: How do I start an ACS script from Decorate?

Post by lukas »

Cjk10000, thanks I havent thought of that and will try it

chopkinsca, what do you mean monster =/ There is no monster involved.

NeuralStunner, D= then I will have to make a new CustomInventory actor that in its pickup state executes ACS and gives this other PowerupGiver item. So complicated...

Well thanks anyway for replies. I'll try what Stunner and Cjk say and see if it will work.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: How do I start an ACS script from Decorate?

Post by Gez »

Cjk10000 wrote:See coded out part above... I wonder if that can be called?
No.

Only [wiki]action functions[/wiki] (aka codepointers) and [wiki]action specials[/wiki] can be called from DECORATE states. [wiki=Built-in ACS functions]ACS functions[/wiki] cannot.
User avatar
lukas
Posts: 586
Joined: Sun Apr 04, 2010 10:37 am
Location: Belgrade, Serbia

Re: How do I start an ACS script from Decorate?

Post by lukas »

then I will have to make a new CustomInventory actor that in its pickup state executes ACS and gives this other PowerupGiver item. So complicated..
Tried this, doesnt work =(.
And tried what Cjk10000, but as Gez said - no luck...
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: How do I start an ACS script from Decorate?

Post by InsanityBringer »

lukas wrote:chopkinsca, what do you mean monster =/ There is no monster involved.
the monster is actually just the generic actor. the generic actor is the caller of the script, not the player. Since faderange affects the caller's screen, this doesn't work because not only does the caller not have a screen, it's also not the player.

To fix this, use an ACS script to assign the player a TID, and then use [wiki]SetActivator[/wiki] in your script to that tid


EDIT I NEED TO GO BACK TO LIT CLASS
Last edited by InsanityBringer on Sun Oct 03, 2010 9:24 am, edited 1 time in total.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: How do I start an ACS script from Decorate?

Post by Gez »

The caller of a CustomInventory's pickup/use/drop states is the player, or whatever else is picking it up, using it, or dropping it.
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: How do I start an ACS script from Decorate?

Post by InsanityBringer »

oh.. I'm an idiot with no reading comprehension, sorry
User avatar
chopkinsca
Posts: 1325
Joined: Thu Dec 11, 2003 5:03 pm

Re: How do I start an ACS script from Decorate?

Post by chopkinsca »

I was tired. When I heard decorate I assumed it was a monster actor. I'm also blind apparently.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: How do I start an ACS script from Decorate?

Post by NeuralStunner »

lukas wrote:NeuralStunner, D= then I will have to make a new CustomInventory actor that in its pickup state executes ACS and gives this other PowerupGiver item. So complicated...
Yes. And if you think that's overly complicated, Decorate is not for you. ;)
Locked

Return to “Editing (Archive)”