Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/19/24 18:45
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
3 registered members (7th_zorro, AndrewAMD, TedMar), 837 guests, and 2 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
Gravity on a specific entity #102452
12/17/06 17:59
12/17/06 17:59
Joined: Jun 2005
Posts: 130
K
khanoftruth Offline OP
Member
khanoftruth  Offline OP
Member
K

Joined: Jun 2005
Posts: 130
I am trying to create a gravity script that only effects the targeted entity, so it can't be a global var. How should I do this?


The Galvanic Productions Hompage: www.GalvanicProductions.tk For our current project, click on the Nirvana link.
Re: Gravity on a specific entity [Re: khanoftruth] #102453
12/17/06 18:54
12/17/06 18:54
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
Why do you treat yourself with MP? Learn doing everything with c-script and than think about looking at that devil stuff.

Re: Gravity on a specific entity [Re: TWO] #102454
12/17/06 22:22
12/17/06 22:22
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
What does this have to do with MP? Be more specific please.

Re: Gravity on a specific entity [Re: fastlane69] #102455
12/18/06 21:14
12/18/06 21:14
Joined: Jun 2005
Posts: 130
K
khanoftruth Offline OP
Member
khanoftruth  Offline OP
Member
K

Joined: Jun 2005
Posts: 130
Well, for normal gravity, I would just set a universal force.z. Here, if I modify the force.z at all, every player will be affected. That doesn't work.


The Galvanic Productions Hompage: www.GalvanicProductions.tk For our current project, click on the Nirvana link.
Re: Gravity on a specific entity [Re: khanoftruth] #102456
12/18/06 23:32
12/18/06 23:32
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline
Serious User
PrenceOfDarkness  Offline
Serious User

Joined: Aug 2004
Posts: 1,305
New York
DUDE BE MORE SPECIFIC. Is this a local or global entity. Do want this 2 effect all clients or just 1 specific client (meaning locally on his machine alone like a menu).

If u want something to happen to a specific "player" but be seen on all machines what you can do is have a function that runs only once when the game starts, and have a variable holding the current number of players assigned to the player (if there are 5 players now that this new player has joined then he is player 5). Make sure this runs only once, and set it to that entity's skill at the start of the function. Now you can check the entities to find the one with a specific id and manipulate just that player. Here is a way you could assign a player id to all players (this is rough scripting might contain errors)

define skill1, id;
var Num_players;
//put this in your main function

function server_called
{
if(connection != 1)
{
num_players += 1;
send_var(num_players,send_all);
}
}
on_server server_called;

function player_func
{
var do_once;
while(my==null){wait(1);}
while(1)
{
wait(1);
if(do_once != 1)
{
do_once = 1;
my.id = num_players;
}
}
}

This was a 2 minute rough job and looking at it even know i see a few mistakes but that was just for conceptional perposes, just to give you an idea of a way it could be done. If you have no idea what I'm talking about then your probably not ready for MP anywayz


"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.

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