Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 1,390 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
moving enemies along path #169420
11/26/07 02:02
11/26/07 02:02
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
It's me again =P

So basically I have this boss with Three Phases in my game, and during phase 3 he starts to run around, ideally on a set path made in WED, in the direction of the player. I have the boss, a path, and the player in the level. And I am trying to use path_scan to get him onto the path, the only problem is I dont know if its working because Im not sure how to get him to actually move along that path towards the player. The help files i was reading on this assume taht I have some functions already made, which i unfortunatly dont.

Re: moving enemies along path [Re: immolat3] #169421
11/26/07 03:27
11/26/07 03:27
Joined: Apr 2006
Posts: 624
DEEP 13
badapple Offline
User
badapple  Offline
User

Joined: Apr 2006
Posts: 624
DEEP 13
check out aum68 unanswered questions section looks like just what you need

Re: moving enemies along path [Re: badapple] #169422
11/28/07 22:28
11/28/07 22:28
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
i read that and tried it, but it doesn't really work at all. lol.

is there an easy way to just get an entity moving along a path?

Re: moving enemies along path [Re: immolat3] #169423
11/28/07 22:49
11/28/07 22:49
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
this is how i do it atm:
Code:

action pathRunner()
{
my.push = 10;
var health;
VECTOR temp;
VECTOR startPos,endPos,nodeCheck;
var node = 1,anim = 0;
path_set(me, my.string1);
while(1)
{
health = 100;
while(health>0)
{
path_getnode(my,node, startPos, my.skill1);
vec_set(my.x,startPos);
node = path_nextnode(my,node,1);
path_getnode(my,node, endPos, my.skill1);
vec_set(temp,endPos);
vec_sub(temp,my.x);
vec_to_angle(my.pan,temp);
my.tilt = 0;
my.roll = 0;
while(vec_dist(my.x,endPos)>5)
{
c_move(me,vector(15*time_step,0,0),nullvector,IGNORE_SPRITES|IGNORE_PASSABLE|IGNORE_YOU);
anim += result;
ent_animate(me,"walk",anim,ANM_CYCLE);
c_setminmax(me);
wait(1);
}
wait(1);
}
wait(1);
}
ent_remove(me);
}



only problem here your path has to be a closed one, since it doesnt walk back... it works quite good here...


www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Re: moving enemies along path [Re: ello] #169424
11/29/07 01:16
11/29/07 01:16
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
im trying that with my character and it keeps setting him at the first part of the path and then he bugs out and goes back and forth in a really small spot quickkkkkkkly

Re: moving enemies along path [Re: immolat3] #169425
11/29/07 07:24
11/29/07 07:24
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
hm, maybe your path has two nodes very nearby and than the path splits into more than one way? since it works here


www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1