Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 7 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: How to get x or y or z value from position?
Dutch77
General Member
Since: Oct 7, 2007
Posts: 48
Last: May 5, 2011
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Thursday, Nov. 26, 2009 06:00 pm
Hi, I've got a problem. I need to extract x y z values from position of model. I have a model on
pos (1,2,3)
pos (x,y,z)
and I need to get each values from position -> x = 1 y=2 z=3...

Is there any function thats doing that?

I'm making something like jetpack or plane or bird... simply something that flies xD
Share |
COD4GRC
General Member
Since: Aug 12, 2007
Posts: 44
Last: Jan 30, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Thursday, Nov. 26, 2009 06:08 pm
This should do the trick;

Code:
model = getent("mymodel_name", "targetname");
x = model.origin[0];
y = model.origin[1];
z = model.origin[2];
Share |
Dutch77
General Member
Since: Oct 7, 2007
Posts: 48
Last: May 5, 2011
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Thursday, Nov. 26, 2009 06:37 pm
thanks! Thats exactly what I want :)
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»