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 (AndrewAMD), 1,244 guests, and 3 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
[newton] #96714
10/31/06 16:50
10/31/06 16:50
Joined: Aug 2005
Posts: 176
Latvia
HackerL Offline OP
Member
HackerL  Offline OP
Member

Joined: Aug 2005
Posts: 176
Latvia
OK, i have problems, i am not an expert with c++, i preffer using free pascal, but thats not the point!
I have tried many times to get:

1. when p_vehicle(players car) hits in my script passes thru the object, game should instantly close!

2. and this will be like request, can you programm, for newton a script, when i with p_vehicle drive in the garage, on top of the screen will show messege, for 10 seconds, and then game will close, or will be reseted to menu!


Ok sorry for my terrible english Thanks for reading, and responding to my topic!


UPS! Forgot my script!

Code:
 action special_entity

{
//while (p_vehicle == null) {wait (1);} // wait until the player is created
while (1)
{
{


if (p_vehicle.x = my.x) // the player has come close to the door
{

quit();
}
wait (1);
}

}



Last edited by HackerL; 10/31/06 16:51.

Now i am working on game NISSAN CHALLENGE! My home page is http://raivucis.ilva.lv
Re: [newton] [Re: HackerL] #96715
10/31/06 18:20
10/31/06 18:20
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
p_vehicle might never be exactly at position special_entity.x.
Perhaps, you should use a distance check instead.
Code:

define _quitTriggerDist, skill1; //set this in WED
//uses: _quitTriggerDist
action special_entity {
while (p_vehicle == null) {wait (1);} // wait until the player is created
while (my != null) {
if (vec_dist(p_vehicle.x, my.x) <= my._quitTriggerDist) { // the player has come close to the door
quit();
}
wait (1);
}
}


I probably wouldn't use the door entity's position. I would probably use an additional entity which might placed inside of the garage.

Re: [newton] [Re: testDummy] #96716
10/31/06 19:10
10/31/06 19:10
Joined: Aug 2005
Posts: 176
Latvia
HackerL Offline OP
Member
HackerL  Offline OP
Member

Joined: Aug 2005
Posts: 176
Latvia
thank you!


Now i am working on game NISSAN CHALLENGE! My home page is http://raivucis.ilva.lv

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