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
vec_for_vertex problem! #8371
02/23/02 03:41
02/23/02 03:41

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Ok, this is the first time I'm using this function so if I'm dumb please forgive me.

VAR flame_pos[3];

FUNCTION flame_activate ()
{
WAIT 64;
WHILE (1)
{
IF (player!=NULL)
{
temp.x=2*cos(player.pan);
temp.y=2*sin(player.pan);
temp.z=2;
vec_for_vertex(flame_pos,test_ent,287);
effect(blue_flame_particle,1,flame_pos,temp);
}
wait(1);
}
}

The vec_for_vertex line produces WDL errors, meaning A5 will start but with the first vec_for_vertex there's a messagebox saying "WDL crash in flame_activate" and with this the function will be terminated...
Could anybody please tell me what I'm doing wrong??? PLEEEEEEAAAAAAASSSEEEEEE [Big Grin]

Re: vec_for_vertex problem! #8372
02/23/02 15:17
02/23/02 15:17
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
LX,

Just so we are all starting on the same page, are you CERTAIN that test_ent is defined at the time you are running this? I see that you do the check for player....

Question 2, are you sure that Test_ent HAS at least 287 vertices?

Quesiton 3, are you sure that you never MORPH the model type of test_ent into another model type that may not have that many vertices...

See if the answers to any of these questions help. If not, we'll try something else.

Good luck!

- WildCat


Visit us at [url=http://www.vertexgames.com]Vertex Games[/url]!
Re: vec_for_vertex problem! #8373
02/23/02 18:07
02/23/02 18:07

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Test_ent is set to a global entity even before flame_activate is called. It definately has more than 287 vertices (about times ten) and it never morphs. This is just a test level where I test everything before it's implemented into the real game.

Re: vec_for_vertex problem! #8374
02/23/02 18:41
02/23/02 18:41

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



I placed a normal entity in the level and set test_ent to this entity and it worked. Is there anything special about using vec_for_vertex() with global entites??

Re: vec_for_vertex problem! #8375
02/24/02 22:48
02/24/02 22:48
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
Thats a great question. I'd love to know the answer to that as well.

Doug, JCL?


Visit us at [url=http://www.vertexgames.com]Vertex Games[/url]!
Re: vec_for_vertex problem! #8376
02/25/02 09:56
02/25/02 09:56
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
By "global entity" do you mean one that has been defined via WDL rather than just placed in the level? If this is the case, then you will obviously get an error as the model must exist in the level before a position of one of its vertices can be calculated... If the model is created via script in the first frame cycle then you may get an error as well, in which case you can put a wait(1) at the beginning of your action so it will wait until the next frame cycle (ie. after the entity has been created) before trying to calculate the vertex position.

I've used vec_for_vertex quite a bit (for a multipart model) and I've had empty pointer errors and lag if things aren't set up perfectly in order...

Not sure if that answers your question...
Cheers,
K.

Re: vec_for_vertex problem! #8377
02/25/02 15:19
02/25/02 15:19

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



By "global entity" I mean a nodel created via

ENTITY weapon
{
X=1;
Y=2;
Z=3;
VIEW=camera;
FLAGS=visible;
LAYER=2;
}

I know that everything in a 3D engine has to be perfectly in order but I even have a "wait(64);" at the beginning of the function (see below) and this action is definately called AFTER the creation of the entity.

Re: vec_for_vertex problem! #8378
02/27/02 00:15
02/27/02 00:15

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Doug, JCL, where are you???

Re: vec_for_vertex problem! #8379
02/27/02 03:44
02/27/02 03:44

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Global Entities are not existant in the 3d World, they are only 3d-Panels, let's make this short:You can't use the vertex and mesh methods on Global Entities, just create a dummy Entity and use your methods on this one


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