Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 4 1 2 3 4
Re: WILL SOLVE ENT_VERTEX!!!!! #1273
03/30/01 10:55
03/30/01 10:55

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Have you checked your Jump animation model to see if the vertex that you are attatching to is for some reason shifted at the height of the jump animation?

Re: WILL SOLVE ENT_VERTEX!!!!! #1274
03/30/01 11:02
03/30/01 11:02

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Another idea. You could (maybe) put the coordinates of the vertice on the Parent model into an array, then use that array as the location for the child model. The child models origin would need to be precisely where you want it to attatch to the parent model. This may end up allowing you to create a loop with no lag. No telling without seeing the whole code for your problem though, the loop that calls the function, and the function itself.

Any way, maybe this will help


Re: WILL SOLVE ENT_VERTEX!!!!! #1275
03/30/01 21:17
03/30/01 21:17
Joined: Mar 2001
Posts: 1,825
London, England
Keith B [Ambit] Offline
Expert
Keith B [Ambit]  Offline
Expert

Joined: Mar 2001
Posts: 1,825
London, England
Hi ASallade, thanks again for your help. It's definitely not the jump animation, as I've been using a test model which only has a walking animation at the moment, so when he jumps the animation just freezes. The array idea sounds interesting. The code I'm using to test ent_vertex is a modified version of the office.wdl - I've just added the following two functions:

function vertices(vertex) // updates the position of the vertex...
{
while(1) // this should already be a loop
{
ent_vertex(position,vertex); //'position' records the vertex position
wait(1);
}
}

function attach_object
{
while(1)
{
if (you == player && person_3rd == 0) {
my.invisible = on;
} else {
my.invisible = off;
}
vec_set(my.x,position); // origin of new model is set to vertex position
vec_set(my.pan,you.pan);
wait(1);
}
}

And then I've added these two lines:

vertices(26);
create(<blow.mdl>,nullvector,blow_detector);

after everything in the player_client script, like this:

function player_client()
{

MY.FAT = OFF;
MY.NARROW = ON; // set narrow hull
MY._WALKFRAMES = 1; // enable frame name animation
MY._FORCE = 0.5; // He should be not too fast
MY._MOVEMODE = _MODE_WALKING;
MY._BANKING = -0.1;
MY.__JUMP = ON;
MY.__DUCK = ON;
MY.__STRAFE = ON;
MY.__BOB = ON;
MY.__TRIGGER = ON;

MY.ENABLE_DISCONNECT = ON;
MY.EVENT = _actor_connect;

player_move();
if (MY.shadow == OFF) { drop_shadow(); }

vertices(26);
create(<blow.mdl>,nullvector,blow_detector);
}

Like in the office demo, the character is then controlled using player_prog (ie that is chosen from the list in the Properties panel for the character model:

ACTION player_prog
{
ifDEF CLIENT;
remove(ME); // each client generates his own player
ifELSE;
player_client();
ENDif;
END;
}

I have tried putting the vertices() and create() line in this player_prog() section instead, but still the same problem.

Anyway, thanks again.
Cheers,
Ambit


Re: WILL SOLVE ENT_VERTEX!!!!! #1276
03/31/01 04:09
03/31/01 04:09

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Where are you calling the Attach_Object function from?

Could you email me your script?


Re: WILL SOLVE ENT_VERTEX!!!!! #1277
03/31/01 04:15
03/31/01 04:15

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



So far it looks to me like you have one too many wait(1) commands. This would cause a lag based on how fast you are moving. If you are standing still it would catch up.

Or, you could be accidentally calling the attatch-object command Before the player is actually moved.


Re: WILL SOLVE ENT_VERTEX!!!!! #1278
03/31/01 05:15
03/31/01 05:15

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Ok..
Is attatch_object called AFTER the section that looks like this, or before it:


player_move();
if (MY.shadow == OFF) { drop_shadow(); }

vertices(26);
create(<blow.mdl>,nullvector,blow_detector);
}
--------------
Try changing your flow on this code. A function performs an calculation and returns to the place in the code that called it when it finishes, so you dont need a While(1) loop in the Vertices function. nor do you need a wait(1) in it, because it will kick back over to the point that called it. Example:


function attach_object(myVertice)
{
while(1)
{
vertices(myVertice); //Call the Vertices function from within the attatch loop, this way, every frame, your subroutine will get the new position immediately before passing that value to the attatch commands

if (you == player && person_3rd == 0) {
my.invisible = on;
} else {
my.invisible = off;
}
vec_set(my.x,position); // origin of new model is set to vertex position
vec_set(my.pan,you.pan);
wait(1);
}
}

function vertices(vertex) // updates the position of the vertex...
{
ent_vertex(position,vertex); //'position' records the vertex position. Note that there is no while loop (we are already in one from the attach_object function, and no wait loop (for the same reason)
}


_____________________

Experiment with this outline, I think it will tighten up the looping and waiting.




Re: WILL SOLVE ENT_VERTEX!!!!! #1279
03/31/01 05:21
03/31/01 05:21

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



For that matter, try this, its cleaner:

function attach_object(vertex)
{
while(1)
{
ent_vertex(position,vertex);

if (you == player && person_3rd == 0)
{
my.invisible = on;
} else {
my.invisible = off;
}
vec_set(my.x,position); // origin of new model is set to vertex position
vec_set(my.pan,you.pan);
wait(1);
}
}


-------------------



Re: WILL SOLVE ENT_VERTEX!!!!! #1280
03/31/01 07:13
03/31/01 07:13
Joined: Mar 2001
Posts: 1,825
London, England
Keith B [Ambit] Offline
Expert
Keith B [Ambit]  Offline
Expert

Joined: Mar 2001
Posts: 1,825
London, England
Hi ASallade,

Thanks a million for all the time you've taken to help me with this. I've tried all your suggestions, but still have the same problem. It's driving me crazy... I could e-mail you a zip file (about 1mb) that shows the exact problem if you still don't mind taking a look. Anyway, thanks again.


Re: WILL SOLVE ENT_VERTEX!!!!! #1281
03/31/01 09:26
03/31/01 09:26

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



aaron@dctechservices.com
go for it

Page 4 of 4 1 2 3 4

Moderated by  HeelX, Spirit 

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