Actor Pointer refuses to be changed via ACS

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.
Locked
jdagenet
Posts: 77
Joined: Tue Aug 09, 2011 10:26 pm

Actor Pointer refuses to be changed via ACS

Post by jdagenet »

So since Spawn doesn't transfer over the activator of the script, a person would need to directly modify the pointers to assign a master to the spawned class if they needed it to have one.
Here is my attempt of doing so:
Spoiler:
The only problem is that the actor's pointers remain unchanged for some strange reason.
Now the Print function at the bottom is used to clarify whether the pointer was accessed and changed. If it prints 1 (which it does), then everything worked out the way it was meant to, but when I try to clarify if the activator of the script is the master of the dummyActor nothing happens. It acts as if the player is not the master of the spawned class.

The actor definition for the class I'm spawning is very, very basic:
Spoiler:
I'm using A_Print to clarify whether the activator of the ACS script is the master of the actor

I've tried every trick in the book and I've even asked a few others about this issue and they have no idea what is happening either so this is my last resort.
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

Re: Actor Pointer refuses to be changed via ACS

Post by Blue Shadow »

jdagenet wrote:I'm using A_Print to clarify whether the activator of the ACS script is the master of the actor
That wouldn't help verify whether the actor has a master or not, considering it just prints a message upon spawn. Try giving an item, instead:

Code: Select all

A_GiveInventory("RadSuit", 1, AAPTR_MASTER)
If you as a player is the activator of the script, you should get a rad suit, given to you by the dummy actor.
jdagenet
Posts: 77
Joined: Tue Aug 09, 2011 10:26 pm

Re: Actor Pointer refuses to be changed via ACS

Post by jdagenet »

Ah, the "pointer giveto" parameter is what I didn't know about, I had no idea you were supposed to clarify the pointer.

Awesome stuff, this works perfectly now, thanks!
Locked

Return to “Editing (Archive)”