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

Members Online

»
0 Active | 106 Guests
Online:

LATEST FORUM THREADS

»
run artillery on maps
CoD+UO Map + Mod Releases
Call of DutyŽ: WWII
CoD WW2 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 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: How do I make my angle-specific script.... generic?
cskiller86
General Member
Since: Nov 23, 2009
Posts: 528
Last: Oct 25, 2011
[view latest posts]
Level 6
Category: CoD4 Scripting
Posted: Tuesday, Jan. 25, 2011 02:06 am
The thing is that self.bridge.angles == 0 isn't correct. The angles of an object is a 3 dimension vector.
That's why I wrote that in pseudocode, because I'm not sure how to get the angles in one direction. I mean I know that anglesToRight(self.bridge.angles) returns the bridge's angles on Y axis, but I'm not sure if the value returned is in degrees. What I mean is, I'm not sure this
Code:
if (anglesToRight(self.bridge.angles) == 180)
{
...
}
is correct.
Or maybe you could use if (self.bridge.angles) == (0, 0, 0).

On another note, by else do nothing I meant that if the bridge is not aligned on the 2 horizontal axes, the script should not continue. So you should add a iprintln("The bridge is not correctly aligned.") to let you know of the problem and also maybe a return to end the script.
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Tuesday, Jan. 25, 2011 10:30 am
@ 9837265498
You can either set the bridges angle OR use if elseif rotateroll / pitch and doing test against something other than the angle.
You mustn't use both.
Share |
novemberdobby
General Member
Since: Sep 17, 2006
Posts: 1965
Last: Oct 13, 2013
[view latest posts]
Level 8
Forum Moderator
Category: CoD4 Scripting
Posted: Tuesday, Jan. 25, 2011 10:41 am
You could make a prefab with an extra script_origin which is at the final drawbridge angle and make the scripts rotate the bridge to those. Then you could rotate it in any way (even 45 degrees) and it'd still work
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 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

»