problems with movetogoal

Discuss programming in the QuakeC language.
Post Reply
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

problems with movetogoal

Post by Nahuel »

is there a way to get some function like movetogoal but working with z value?? movetogoal doesn´t work with the z axys (the monsters doesnt consider height), i really need a movetogoal with z value or something similar. Thanks :)
hi, I am nahuel, I love quake and qc.
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: problems with movetogoal

Post by ceriux »

this tutorial gives the ogre z-awareness when aiming. maybe useful? http://inside3d.com/showtutorial.php?id=52
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: problems with movetogoal

Post by qbism »

Need a waypoint system?
http://shoresofnis.wordpress.com/guides ... e_dynamic/
"If you have mapped for HL2, then you already understand roughly how this works.
You place path_node entities all over the floor of the map and at runtime, these entities will connect with each other to form a graph.

Once this is done, monsters search for the player through this connected system of path_nodes and use them to make decisions on where to move next. This allows them to, for example, path up a spiral staircase or run away from you to get to stairs leading to you instead of remaining trapped in a pit."
Seven
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: problems with movetogoal

Post by Seven »

Hello Nahuel,

I am not sure for what reason you need it. If the links + tips given from ceriux and qbism does not help, maybe necros explanation from a while ago can help you further ?
Please try this thread:
http://forums.inside3d.com/viewtopic.ph ... c34#p38873

When you speak about "consider height". Do you mean, that the monster shall move upwards from the ground (fly ?). Then its movetype and flags must be changed as well.
I am just poking around in the fog here :)
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: problems with movetogoal

Post by Nahuel »

Thank you guys , sorry for my lack of explanation. What I need is basically a mobile camera system. time ago I programmed a basic system of cameras in csqc.
http://www.youtube.com/watch?v=CMa2j11i0Uo

Some cameras moves based on player's origin. What do I think is create a simple system of cutscenes, and to change the origin of the cameras i thought it was good idea to use movetogoal. Movetogoal is really buggy to do the work and the cameras fails and have "strange" behaviors. What do you think is easier to use for move a single entity from one point to another in qc? I thought use velocity_ values​​, but it's really complicated do this from scratch. how can i do rhis? any example? What I need is:
-move a simple entity from a point to another point in a map with precise origin and angles.
- When this entity finishes its predetermined path can activate triggers and other stuff. How do you think I can do that? I tried as func_train, but does not consider my angles, and is not "fluid" for what I need.Thank you for your help
hi, I am nahuel, I love quake and qc.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: problems with movetogoal

Post by Spike »

movetogoal will not really do anything except horizontal stuff. its for MOVETYPE_STEP monsters stepping through the world, nothing more. it can do vertical stuff only for FL_FLY or FL_SWIM monsters, and very much as a if (target.origin_z > self.origin_z) self.origin_z += 16;
its really dumb, and doesn't have any routing. it'll let the monster run away from its goal more as a bounce than anything inteligent.

there's a lot of ways you can write a routing algorithm. most are basically a flood-fill routine. that is, you walk each node to every single other node counting how long it took, then walk through backwards taking the cheapest route.
routing-type algorithms are generally fairly simple in concept (as opposed to implementation and optimisation), so you should be able to find a good overview of the various possible algorithms.
most maps will need waypoints of some kind. You can use lots of ways to auto-generate waypoints. interrogate the bsp to find surfaces, flood-fill the world, use light entities, periodically placing waypoints underneath players, etc.
the real problem is determining connectivity of waypoints - velocity, gravity, size, etc. which of course depends upon the previous node, which makes following the route order dependant. with stepping monsters, there is no velocity or gravity, yay.
Post Reply