Page 1 of 1

[solved] Icon of Sin is isnide my code D: help

Posted: Wed Nov 25, 2015 5:48 pm
by ibm5155
Hello Guy and Girls, could someone please explain me why acs_execute refuses to be called? is he shy? because that print bold is working but not the acs one '-'

Code: Select all

actor Paper : SwitchingDecoration 15132
{
  Height 40
  Radius 20
  Activation THINGSPEC_Switch
  +USESPECIAL
  +SOLID
  -NOGRAVITY
  
  States
  {
  Spawn:
    DEBR A 1
    Wait
  Active :
	TNT1 A 1 A_PrintBold ("PLEASE WORK 1")
	TNT1 A 0 ACS_Execute(16,0)
	TNT1 A 1
    goto Spawn
  Inactive:
    TNT1 A 1
	TNT1 A 0 ACS_Execute(16,0)
	TNT1 A 1
	goto Spawn
  }
}
acs script

Code: Select all

#include "zcommon.acs"

script 16(void){
    print(s:" FUCK YEAH, IT WORKS!!!!");
}
I had made some decorate code that used to call some acs scripts, but for some reason, it's not working in this case :|, any tips?

RE: Icon of Sin is isnide my code D: help

Posted: Wed Nov 25, 2015 6:07 pm
by Ænima
Probably because the activator is your decoration actor and not the player.

RE: Icon of Sin is isnide my code D: help

Posted: Wed Nov 25, 2015 6:11 pm
by ibm5155
Ænima wrote: Probably because the activator is your decoration actor and not the player.
uh, that was the problem, thanks for the help Ænima :D

RE: [solved] Icon of Sin is isnide my code D: help

Posted: Wed Nov 25, 2015 9:06 pm
by Klofkac
Never use ACS_Execute if you intend to make the script multiplayer friendly. Two players happen to run the same script at same tic, only one executes it.
Use ACS_ExecuteAlways instead.

RE: [solved] Icon of Sin is isnide my code D: help

Posted: Thu Nov 26, 2015 1:57 am
by ibm5155
Klofkac wrote: Never use ACS_Execute if you intend to make the script multiplayer friendly. Two players happen to run the same script at same tic, only one executes it.
Use ACS_ExecuteAlways instead.
Hmm I'll change that.
The way the mod is being developed will not allow multiplayer :(, unless I end up with some weird idea like teleporting the player that didn't touched the door (It's a randomized maze mod)

RE: [solved] Icon of Sin is isnide my code D: help

Posted: Thu Nov 26, 2015 2:05 am
by Ænima
In that case you might be able to keep your current code and just replace Print() with PrintBold() in Script 16 since the only player who will be around to see it is the one who triggered the SwitchingDecoration.