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 2 of 4 1 2 3 4
Re: WILL SOLVE ENT_VERTEX!!!!! #1253
03/18/01 03:26
03/18/01 03:26

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



after jcl's post I tried it again too -- with the same result as yours. I think your sort of problem could only be solved through the attach_clone in the new office level.

Re: WILL SOLVE ENT_VERTEX!!!!! #1254
03/18/01 04:13
03/18/01 04:13

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Ok, Kinex, I take it back. I see you're not an expert. Permission repealed.

Re: WILL SOLVE ENT_VERTEX!!!!! #1255
03/18/01 05:41
03/18/01 05:41

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



lol
i have done everything in WDL now
but how the hell can i make WHILE without WAIT

ahhhhh


Re: WILL SOLVE ENT_VERTEX!!!!! #1256
03/18/01 06:28
03/18/01 06:28

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



OK.. Raul3D has explained me the way.

WHile(counter < 10)
{
//do something
counter += 1;
}

This WHILE loop is 10 times.

but this doesn't solve the problem. cause
you cannot make a endless loop without wait!

[This message has been edited by Kinex (edited 17 March 2001).]


Re: WILL SOLVE ENT_VERTEX!!!!! #1257
03/18/01 07:53
03/18/01 07:53
Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
W
WildCat Offline
Expert
WildCat  Offline
Expert
W

Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
Kinex,
The way A4 works is that everything takes turns with the CPU... one at a time.

Only when a game element hits a wait instruction does it tell the CPU that it's done for now, and to let some other game element have it's turn.

If you did a WHILE(1) with no WAIT, nothing else would get a turn at the CPU, not even the routines that update the screen. Everything would seem to freeze.

I know this is a little confusing at first but WAIT is your friend.

- W.C.



Visit us at [url=http://www.vertexgames.com]Vertex Games[/url]!
Re: WILL SOLVE ENT_VERTEX!!!!! #1258
03/18/01 21:01
03/18/01 21:01

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



What does it matter anyway? what will having no WAIT command in a loop achieve? Theoretically, if you move the main part of the model, THEN attach the ent_vertex part, THEN have the WAIT command, everything should work and stick together perfectly. Except it doesn't, and no-one knows why.

Re: WILL SOLVE ENT_VERTEX!!!!! #1259
03/23/01 10:26
03/23/01 10:26
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, I'm trying this myself and am having similar problems... I'm trying a different technique - I'm trying to call the ent_vertex instruction in a similar way to the attach_clone function is done in the office demo. So instead of vec_set(my.x,you.x) I need something that calls something like ent_vertex(my.x,you.vertex_number), so that the vector is copied from the specified vertex rather than from the you. origin - ie I need to call the vertex number from the you. entity (so that its position is continually updated). Does anyone know how I can do this? Sorry if this is a dumb question, I'm new to WDL...

Re: WILL SOLVE ENT_VERTEX!!!!! #1260
03/23/01 11:40
03/23/01 11:40
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
Okay, I've got it working, but I've got exactly the same problem as SpaceJim! The model I've attached (block.mdl) has a certain lag behind the movement of the "parent" entity... I assume this is because of the wait(1) in my vertices() function, but can't think of another way to do it. Has anyone got any ideas?

function vertices(vertex) // updates the position of the vertex...
{
while(1)
{
ent_vertex(position,vertex);
wait(1);
}
}

function blow_detector //just checks it's in third person view and if it is then the new object copies the pan rotation of its creator
{
while(1)
{
if (you == player && person_3rd == 0) {
my.invisible = on;
} else {
my.invisible = off;
}
vec_set(my.x,position);
vec_set(my.pan,you.pan);
wait(1);
}
}

Then this is placed in the player entity (player_client in the office demo):


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

Thus in this example, the origin of block.mdl is copied to the position of vertex no. 26 in the player_client entity....

So has anybody got any ideas about the lag? Thanks, any suggestions much appreciated,
Ambit


Re: WILL SOLVE ENT_VERTEX!!!!! #1261
03/23/01 13:11
03/23/01 13:11

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



You can read in the manual ("WDL traps") why this produces a time lag.

But you don't need your vertices function. For calculating a vertex position of another entity, just set MY temporarily to that entity, like this:

temp_ent = my; // store MY in another synonym
my = you;
ent_vertex(...);
my = temp_ent; // get MY back


Re: WILL SOLVE ENT_VERTEX!!!!! #1262
03/23/01 13:30
03/23/01 13:30

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



This works for us, we had the lag problem, but we resolved it by connecting out attached Player2 immediately after the real player moved.

Player = Real Controlled player (Driving Hoversurfer)
Our attached player is assigned to Player2 Entity Synonym in their start code.

// Modified Player_move routine
Move_gravity();
IF (Player2!=NULL)&&(Me==Player) {//Connect the secondary player to the board
//Old long hand method, this connects origins
Player2.X=Player.X;
Player2.Y=Player.Y;
Player2.Z=Player.Z;
Player2.Pan=Player.PAn;
}

Player2's main loop handles animation etc, but the above must be done to prevent lag in our case. Check also the way drop shadows work, they don't lag the player.

Works for us. ..... Jethro.


Page 2 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