Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Ledillman

Voxel not moving?

Recommended Posts

Hello, this is my first time doing a voxel thing and i think it looks decent, but i can't make this thing follow a path (it's supposed to move in circles), here's the decorate:

actor Fishy 10701
{
Monster
health 4666
speed 11
mass 128
Painchance 20
Radius 20
Height 16
mass 400
+shootable


States
{
Spawn:
DFIS A -1 A_look
stop

See:
DFIS A -1 A_Chase
loop



}
}

NOTE: As you can see i'm not good at decorate, i've done decorate things just 3 times in my life, 2 of them trees and the third one is this, so i'm not sure what i'm doing wrong.

path script:

#include "zcommon.acs"

script 1 open

{
thing_setgoal(1,2,0,0);

}

Fish has tag of 1 and path node 2 (then it follows path 3, then 4, then 5 then 2 again, repeat)

What i'm doing wrong? do voxels don't move? i need just sprites?

Share this post


Link to post

Ledillman said:

actor Fishy 10701
{
    Monster
    health 4666
	speed 11
	mass 128
	Painchance 20
	Radius 20
	Height 16
	mass 400
	+shootable
	
	
	States
	{
	Spawn:
		DFIS A -1 A_look
		stop
		
		See:
		DFIS A -1 A_Chase
		loop
		
				
		
	}
}

Your problem is absolutely unrelated to voxels. Voxels are merely a replacement for sprite, whether an actor is represented by sprites, voxels, or even nothing at all (TNT1 A frames) does not have any influence on its behavior.

The problem comes from how you have defined the states. A -1 A_Look or A -1 A_Chase. That means that they enter the state and then stay in that state forever and ever. You will need to use an actual looping state -- with a non-infinite duration.

Remember that codepointers are only executed when the actor enters the new state.

Look at actor code like for the imp for example:

  Spawn:
    TROO AB 10 A_Look
    Loop
  See:
    TROO AABBCCDD 3 A_Chase
    Loop
See? Finite durations so that the state is exited after 10 or 3 tics, and then the next state is entered or it loops back to the first. Each time a state is entered this way, the codepointer is run.

And it's especially important for A_Chase. If you want the actor to move, keep in mind that it'll move up to its Speed amount of map units each time it calls up A_Chase. So the smaller the state durations, the faster it'll move. That's why the imp has AABBCCDD 3 instead of ABCD 6.

Share this post


Link to post

Thank you Gez! i realized and it works now! in fact, i edited the voxels and made the fish move his tail and looks better now, thank you very much! :-D

BTW!:

NEVERMIND i figured it out!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×