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 (VoroneTZ), 1,233 guests, and 5 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
Page 1 of 2 1 2
Strange crash #354247
01/17/11 04:33
01/17/11 04:33
Joined: Sep 2003
Posts: 648
Switzerland
snake67 Offline OP
User
snake67  Offline OP
User

Joined: Sep 2003
Posts: 648
Switzerland
Hi. I downloaded the A8.1 trial version and ran a script i wrote in A7. I get a new crash "Script crash in ...: SYS". I could reduce it to the following:

This works:
you=NULL;
//object_distance=c_trace(from_vec, to_vec, IGNORE_ME | IGNORE_PASSABLE | IGNORE_PASSENTS | USE_POLYGON);
if(you!=NULL)
{...

This does not:
you=NULL;
object_distance=c_trace(from_vec, to_vec, IGNORE_ME | IGNORE_PASSABLE | IGNORE_PASSENTS | USE_POLYGON);
if(you!=NULL)
{...

This works again:
you=NULL;
object_distance=c_trace(from_vec, to_vec, IGNORE_ME | IGNORE_PASSABLE | IGNORE_PASSENTS | USE_POLYGON);
...

Any suggestions?

Re: Strange crash [Re: snake67] #354258
01/17/11 10:29
01/17/11 10:29
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline
User
SchokoKeks  Offline
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
I'm still using A7 where I've always relied on the same method, so I can only guess:

You can try to use hit.entity for checking which entity was hit instead of you. It might require settings SCAN_TEXTURE. see the manual unter c_trace and hit.

Re: Strange crash [Re: SchokoKeks] #354276
01/17/11 13:14
01/17/11 13:14
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
sys_marker("CT1");
you=NULL;
object_distance=c_trace(from_vec, to_vec, IGNORE_ME | IGNORE_PASSABLE | IGNORE_PASSENTS | USE_POLYGON);
sys_marker("CT2");
if(you!=NULL)
{...
}
sys_marker(NULL);

Try this code again and check the error message. There are three possibilities:
"Script crash in ...: SYS"
"Script crash in ...: CT1"
"Script crash in ...: CT2"


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Strange crash [Re: Superku] #354306
01/17/11 16:18
01/17/11 16:18
Joined: Sep 2003
Posts: 648
Switzerland
snake67 Offline OP
User
snake67  Offline OP
User

Joined: Sep 2003
Posts: 648
Switzerland
Hi

Thanks a lot. This one is solved. There where to many local vars... But there is an other problem which is new due to porting from A7 to A8 with my Lite-C code. The movement code seems not to work proper, the player is hovering and the collision hull seems to be much bigger. What could this be?

Re: Strange crash [Re: snake67] #354308
01/17/11 16:38
01/17/11 16:38
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
You probably use c_setminmax(my). This function now uses all frames of the model to calculate the bounding box dimension. Replace it with c_updatehull(my,1) (or the like).


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Strange crash [Re: Superku] #354310
01/17/11 17:08
01/17/11 17:08
Joined: Jan 2011
Posts: 120
United States
Logan Offline
Member
Logan  Offline
Member

Joined: Jan 2011
Posts: 120
United States
Oh, nice Superku. I'll have to try that--my movement code in A8 behaves horribly and I assumed it was a scripting error although I copied the algorithm directly from an A6 project. So Snake, you're not alone in that.

Re: Strange crash [Re: Logan] #354314
01/17/11 17:17
01/17/11 17:17
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Additionally, c_setminmax(my) now works in the first frame of an action, beforehand you've had to wait a frame to get the real bb size:

A7 :
action my_action() {
wait(1);
c_setminmax(my);
}

A8 :
action my_action() {
c_setminmax(my);
}

Without the wait, the NARROW and FAT flags would have been set but not the real size because min/max was set at entity creation, that is in A7 the first frame.

(Everything is subject to correction.)


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Strange crash [Re: Superku] #354319
01/17/11 17:56
01/17/11 17:56
Joined: Sep 2003
Posts: 648
Switzerland
snake67 Offline OP
User
snake67  Offline OP
User

Joined: Sep 2003
Posts: 648
Switzerland
Hi

Tried all, nothing changed... I have to think about...

Re: Strange crash [Re: snake67] #354322
01/17/11 18:28
01/17/11 18:28
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Set min/max directly after c_setminmax-call, f.i. to -32...+32.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Strange crash [Re: Superku] #354387
01/18/11 04:37
01/18/11 04:37
Joined: Sep 2003
Posts: 648
Switzerland
snake67 Offline OP
User
snake67  Offline OP
User

Joined: Sep 2003
Posts: 648
Switzerland
Hi

Thanks. Its very wierd. After some playing around with values and "c_update..." i found that it works best with this settings for the player. No "c_updatehull" or "c_setminmax", just this:

my.min_z*=0.75;
my.max_z*=0.75;
my.min_x*=0.2;
my.max_x*=0.2;
my.min_y*=0.2;
my.max_y*=0.2;

But why does A8 behave other than A7 as far as collision is concerned???

Page 1 of 2 1 2

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