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
Page 1 of 2 1 2
Car Physics Demoscript - Problem! #36552
11/20/04 17:56
11/20/04 17:56
Joined: Jun 2004
Posts: 18
Germany/Daun
JKL Offline OP
Newbie
JKL  Offline OP
Newbie

Joined: Jun 2004
Posts: 18
Germany/Daun
I have a problem with the following function. The compiler gives an ERROR "bad or missing parameter unknown function" for "phent_getangvelocity(pRL, temp); angRL=temp.y;". Obviously he dont know the function phent_getangvelocity....
Any help?
My Engineversion is: A6.22Pro

Thanks, jkl





Code:

function UpdateSpeed()
{
while (wheelCounter<4) { wait(1); } //wait for wheels to be init'ed

var players_engine; //handle for soundloop
players_engine = snd_loop(engine_wav, 100,0); // play the engine sound in a loop
snd_tune(players_engine, 80, 80, 0); //80% of real frequency

//var angFL; var angFR;
var angRL; var angRR;
var vecLin[3];
while(1) {
if (DoShutdown) { // quitting?
snd_stop (players_engine);
return;
}

// get linear speed and tune engine sound
phent_getvelocity(pChassis, vecLin, nullvector); //linear speed
downSpeed= vecLin.z * 0.091; vecLin.z=0; // store Z separately
linSpeed= vec_length(vecLin) * 0.091; // convert from quant/sec to kmh
var freq; freq=300*abs(angSpeed)/maxAngSpeed;
snd_tune(players_engine, 5, freq+80, 0); //80% of real frequency

// grab angular velocity vector from rear wheels
phent_getangvelocity(pRL, temp); angRL=temp.y;
phent_getangvelocity(pRR, temp); angRR=temp.y;

// store largest one
if (abs(angRL)>abs(angRR))
{ angSpeed=-angRL; } else { angSpeed=angRR; }

wait(1);
}
}



Re: Car Physics Demoscript - Problem! [Re: JKL] #36553
11/21/04 07:55
11/21/04 07:55
Joined: Sep 2004
Posts: 40
I
iprogramgames2 Offline
Newbie
iprogramgames2  Offline
Newbie
I

Joined: Sep 2004
Posts: 40
I assume you have the pro edition.

1. Back up your gamestudio directory.

2. Go to the updates and announcement thread.

3. Download the latest version of the engine : 6.31.3

4. Install the update.

5. Enjoy.

P.S. You may also want to read my thread on a similar problem a few down from this one.

Re: Car Physics Demoscript - Problem! [Re: iprogramgames2] #36554
11/21/04 09:16
11/21/04 09:16
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Obviously is right: phent_getangvelocity doesn't exsist.

Reread the manual on phent_getvelocity and you'll see that depending on the point you are sampling (ie vecpointlocal) you get a combination of linear and angular velocities.

Do a search on the forums for phent_getvelocity to see how you can then separate the angular velocity from the linear one.

Good Luck!

Re: Car Physics Demoscript - Problem! [Re: iprogramgames2] #36555
11/21/04 11:29
11/21/04 11:29
Joined: Sep 2004
Posts: 40
I
iprogramgames2 Offline
Newbie
iprogramgames2  Offline
Newbie
I

Joined: Sep 2004
Posts: 40

Quote:

phent_getangvelocity doesn't exsist




It does with 6.31.3

Re: Car Physics Demoscript - Problem! [Re: iprogramgames2] #36556
11/21/04 13:55
11/21/04 13:55
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
It does?

I'm afraid I have found no reference to this command in the .31.3 update txt, in the beta text, or anywhere else on the forums.

Where praytell are you getting this function from? Just curious in case I'm missing something here...

Re: Car Physics Demoscript - Problem! [Re: fastlane69] #36557
11/22/04 00:49
11/22/04 00:49
Joined: Jun 2004
Posts: 18
Germany/Daun
JKL Offline OP
Newbie
JKL  Offline OP
Newbie

Joined: Jun 2004
Posts: 18
Germany/Daun
thanx at all, it works now!

Re: Car Physics Demoscript - Problem! [Re: JKL] #36558
11/22/04 03:45
11/22/04 03:45
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Did it work with phent_getvelocity or phent_getangvelocity? If it works with phent_getangvelocity, could you point me to where it's defined. I can't find it anywhere!

Re: Car Physics Demoscript - Problem! [Re: fastlane69] #36559
11/23/04 19:34
11/23/04 19:34
Joined: Sep 2004
Posts: 40
I
iprogramgames2 Offline
Newbie
iprogramgames2  Offline
Newbie
I

Joined: Sep 2004
Posts: 40
Fastlane, I griped about things like what you are experiencing here:

http://www.conitecserver.com/ubbthreads/showflat.php?Cat=&Number=450147&page=0&view=collapsed&sb=5&o=&fpart=1#Post451727#450147

By the way Marco also added our phent_clearvelocity(phent) function!!!



Re: Car Physics Demoscript - Problem! [Re: iprogramgames2] #36560
11/24/04 03:44
11/24/04 03:44
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
The velocity clearing function is a long time coming and a welcome addition. I saw some phent_setvelocity functions and those could prove to be really helpful too.

Though the question still remains...where did anyone see phent_angvelocity or can we agree that it's not a 3DGS PE command?

Re: Car Physics Demoscript - Problem! [Re: fastlane69] #36561
11/24/04 06:40
11/24/04 06:40
Joined: Sep 2004
Posts: 40
I
iprogramgames2 Offline
Newbie
iprogramgames2  Offline
Newbie
I

Joined: Sep 2004
Posts: 40
It's in the car physics demo script. If one has the latest version installed: 6.31.3 then it is compatable. In other words you can run the demo script with no changes. I thought I was going mad when I first tried to run the script as I had found functions that expected nullvector accepting 0 and also found that new phent_angvelocity function. SED doesn't recognize it and it's not documented yet to my knowledge but it must exist as it's compiling. To be more specific it's located within the physics_car.wdl script.

Page 1 of 2 1 2

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