Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 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
help with c-script paths in exchange for model #257328
03/22/09 17:34
03/22/09 17:34
Joined: Feb 2006
Posts: 616
Netherlands
cartoon_baboon Offline OP
User
cartoon_baboon  Offline OP
User

Joined: Feb 2006
Posts: 616
Netherlands
Hi,
I posted a question regarding paths in c-script. You can see the post here .
I haven't yet had a reply and am in need of a solution rather quickly.

So if someone could help me solve this problem I'd be willing to make a lowpoly model or a piece concept art in exchange.

Check out my WIP portfolio website here for an example of my work.

I hope you understand I can't make anything too extensive ATM as I am pretty busy, which is the reason I need an answer so quickly wink but I'll see what I can do. Some kind of prop or a pencil drawn sketch should be no problem

So if someone thinks he's got the answer, let me know and tell me what you want in exhange.

Thanks!

cartoon_baboon

Re: help with c-script paths in exchange for model [Re: cartoon_baboon] #257366
03/22/09 22:30
03/22/09 22:30
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Some other ~cleaner methods seemed to fail. (path_set -> my.string1, path_next iteration)

Drop two entities and two noticeably different paths near those two entities in level.
Set the actions of the entities to e1f_a.
Entities ~loop on separate paths, or don't.


Code:
var temp_pan[3];

var pan_ang_smooth = 0.5;
var tilt_ang_smooth = 0.5;

var pos_node[3];   // array to hold node position

define _nodeHitDist, skill10;
define _moveSpeed, skill11;
define _nodeId, skill71;
define _nodeDir, skill72;
define _ani1, skill73;
var cid = 0;

function e1f_move() {
	c_move(me, vector(my._moveSpeed*time_step, 0, 0), nullvector, GLIDE | IGNORE_PUSH);
	ent_animate(my, "walk", my._ani1, anm_cycle); 
	my._ani1 += 10 * time_step; // 10//number controls the animation speed
}
function e1f_turnTo(&_v) {
	vec_to_angle(temp_pan, vec_diff(temp, _v, my.x));
	my.pan += ang(temp_pan.pan - my.pan) * pan_ang_smooth*time_step;
	my.tilt += ang(temp_pan.tilt - my.tilt) * tilt_ang_smooth*time_step;
}

action e1_a {
	wait(1);
	cid += 1;
	my._nodeHitDist = 25;
	my._moveSpeed = 10;
	// attach entity to nearest path
	//my._nodeId = path_scan(me,my.x,my.pan,vector(360,180,1000));
	//if (my._nodeId == 0) {
	
		//return;
	//}
	if (cid == 1) {
		path_set(me, "path_000");
	} else {
		path_set(me, "path_001");
	}

	my._nodeDir = 1;
	my._nodeId = 1;

	while(me != NULL) {
		if (path_getnode(me, my._nodeId, pos_node, null) == 0) {
			my._nodeDir *= -1;
			my._nodeId += my._nodeDir;
			path_getnode(me, my._nodeId, pos_node, null);
		} 
		if (vec_dist(my.x, pos_node) < my._nodeHitDist) {
			my._nodeId += my._nodeDir;
		}
		e1f_move();
		e1f_turnTo(pos_node);
		wait(1);
	}
}



Re: help with c-script paths in exchange for model [Re: testDummy] #257400
03/23/09 08:31
03/23/09 08:31
Joined: Feb 2006
Posts: 616
Netherlands
cartoon_baboon Offline OP
User
cartoon_baboon  Offline OP
User

Joined: Feb 2006
Posts: 616
Netherlands
It works smile

So, is there a model I can make in return for you?

Thanks,

cartoon_baboon


Moderated by  adoado, checkbutton, mk_1, Perro 

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