Warp actor under the grounds

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Warp actor under the grounds

Post by Apeirogon »

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 all

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);

}

}

User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Warp actor under the grounds

Post by Apeirogon »

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.
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Warp actor under the grounds

Post by Apeirogon »

Oh yes, I already asked such question.
Feature suggestion time?!
Post Reply

Return to “Scripting”