Warp actor under the grounds

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Warp actor under the grounds

Postby Apeirogon » Thu Dec 06, 2018 2:42 pm

I want to have image/texture of whats going on in front of a player from below the ground. For this I make special camera actor and force it follow the player.
But every time I try to warp it under the ground it stuck on the current sector floor level and refuse to warp deeper. I try to use set origin/xyz and a_warp with add to actor noclip, noblockmap and nointeraction flags with no effect.
Why does it happens and how to bypass this?

Example
Code: Select allExpand view
version "2.4"

class camera : actor
{
default
{
   radius 1;
   height 1;
   +nointeraction;
   +noclip;
   +noblockmap;
}

}


class cameraman : inventory
{
//tracer is camera
override void doeffect()
{
   if(self.tracer == null)
   {
      bool test;
      [test, self.tracer] = a_spawnitemex("camera", 0,0,0);
   }

   tracer.setorigin( (owner.pos.x, owner.pos.y, owner.pos.z - owner.height), false );

   console.printf("owner Z %d", owner.pos.z);
   console.printf("camera Z %d", tracer.pos.z);

}

}

Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Warp actor under the grounds

Postby Apeirogon » Wed Dec 12, 2018 4:57 am

So, is it possible?
Because nointeraction actor, if it have some velocity, can "fly" out of the bonds of sectors floor/ceiling, while I cant do so using script.
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017


Return to Scripting

Who is online

Users browsing this forum: Collegia Titanica, Player701 and 3 guests