MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoDWW Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
FiremanPaul [Forum]
cabelera85 [Downl]
OutPoursTh... [Forum]
Lee [Today]
LS-R1-mini [Forum]
fredisdead [Forum]
RePhLeX [Forum]

7 Members and 21 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Saturday, Nov. 22nd
CoD:WW Video Tutorial is up!
Friday, Nov. 21st
MODSonair Episode 154
Thursday, Nov. 20th
Call Of Duty World At War - Mod Tools
Wednesday, Nov. 19th
Half-Life 1 $0.98
Sunday, Nov. 16th
MODSonair 154 Live
Latest Poll
Would you pay for mod tools?
I would pay a one time fee for mod tools for my favorite title 8.42%
I would pay a monthly/yearly subsrciption fee for mod tools for my favorite title 0.5%
I already paid for the game - Tools should come bundled because I am just fixing what the developers broke 67.82%
100% definitely NOT! 19.31%
I haven't seen a game yet that wasn't 100% perfect when the developers released it 2.48%
Games are the devil! 1.49%
Read More...
16 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
compiling errors
CoD:WW Level Des.. Posts: (26) Views: (281) by COLMAC
Cod4 Loadscreen problem , what a suprise
CoD 4 Level Desi.. Posts: (1) Views: (17) by RePhLeX
Script compile error
CoD2 Scripting.. Posts: (2) Views: (16) by playername
No sound
CoD:WW Level Des.. Posts: (7) Views: (92) by Smithy
Art of War Central Half-Life 2 Mods for Dummies
CoDWW Download
Forums
MODSonline.com 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, rEdrUmMDK, Foxhound, Wyatt_Earp, Rasta, StrYdeR, The_Caretaker, Cypher2004, batistablr, Welshy
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: get orientation of an prefab
alfabigo
General Member
Since: Jan 16, 2008
Posts: 50
Last: Jul 8, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Jun. 13, 2008 08:27 pm
Hi, I've been working on a map about door-down .

map


I did 1 prefab . This is:
1 door + origin => script brush model (not targetname)
1 trigger => trigger damage (targername tiggerPuerta)

Connect enttities:

trigger --- W ----> door

so, trigger.targer => Door


I have put in map several doors in different directions.


part of script


Code:



questions



1.-How can we know the orientation of the door?

Certainly, I would make an "if"

if door orientation "x" ---> door rotatePich (-90.1);
if door orientation "y" ---> door rotatePitch (-90.1);

2.- another questions .


How can I allow only the melee attack? if shot with weapons to "trigger" I don't want this to work,

I found this function out there that can give some idea.

"Self enableGrenadeTouchDamage ();"

Regards ;)

Excuse my language. I don't speak English


The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11559
Last: Oct 4, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD2 Scripting
Posted: Saturday, Jun. 14, 2008 06:12 am
puerta.angles should tell you the angles of the door.

The comments are what the game prints?
// all show me angles (0,0,0)
// all show me angles (0,0,-90)?

If so, does it also do that if you change puerta rotateRoll (-90,1); to puerta rotateRoll (90,1);, for instance? Or does it then return 0,0,90?

2nd:
Use a trigger_damage, press N and tick the boxes...
pistol_no, rifle_no, etc..
alfabigo
General Member
Since: Jan 16, 2008
Posts: 50
Last: Jul 8, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Saturday, Jun. 14, 2008 01:48 pm
The_Caretaker writes...
Quote:
puerta.angles should tell you the angles of the door.

The comments are what the game prints?
// all show me angles (0,0,0)
// all show me angles (0,0,-90)?

If so, does it also do that if you change puerta rotateRoll (-90,1); to puerta rotateRoll (90,1);, for instance? Or does it then return 0,0,90?

2nd:
Use a trigger_damage, press N and tick the boxes...
pistol_no, rifle_no, etc..


-------------------------------------------------------------------------
Correction:
--------------
I said:
if door orientation "x" ---> door rotatePich (-90.1);
if door orientation "y" ---> door rotatePitch (-90.1);
and is :
if door orientation "x" ---> door rotatePich (-90.1);
if door orientation "y" ---> door rotateRoll (-90.1);
--------------------------------------------------------------------------

The comments are what the game prints? ....yes

---------------------------------------------------------------------------
puerta rotateRoll (-90,1); ---> return (0,0,-90)
puerta rotateRoll (90,1); ---> return (0,0,90)

puerta rotatePich (-90,1); ---> return (-90,0,0)
puerta rotatePich (90,1); ---> return (90,0,0)

------------------------------------------------------------
i wish know orienttation of door . then I will do :

if door orientation "x" ---> door rotatePich (-90.1);
if door orientation "y" ---> door rotateRoll (-90.1);

In both cases the door falls backwards...oka ?

regards-.-;)


The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11559
Last: Oct 4, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD2 Scripting
Posted: Saturday, Jun. 14, 2008 02:41 pm
Well.. the script obviously returns the correct angles, so you can use them in your script do determine the doors orientation.

what kind of script are you using for your

if door orientation "x"
and
if door orientation "y"

script?

What exactly are you having problems with?
alfabigo
General Member
Since: Jan 16, 2008
Posts: 50
Last: Jul 8, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Saturday, Jun. 14, 2008 05:32 pm
these angles belong to the door after falls.
and I need know the doors orientation, before they fall.

look here [read]: "checkDamage()" .

before starting the rotation of the door (door down) => all doors have angle (0,0,0), being that I am placed in different positions in map. you understand ? . Some doors are oriented to the south, anotherr to the west, another to the north ... but the scritp shows me angles (0,0,0) for all. I don't understand what happening ???.[banghead]

the script


Code:



saludos.-[thumbs_up]
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11559
Last: Oct 4, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD2 Scripting
Posted: Saturday, Jun. 14, 2008 05:44 pm
That's because, in the prefab, the orientation of your door is 0,0,0. If you want this to work, you'll have to make all the doors seperately in your map, not by using a prefab.
alfabigo
General Member
Since: Jan 16, 2008
Posts: 50
Last: Jul 8, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Saturday, Jun. 14, 2008 06:20 pm
The_Caretaker writes...
Quote:
That's because, in the prefab, the orientation of your door is 0,0,0. If you want this to work, you'll have to make all the doors seperately in your map, not by using a prefab.


[lol].

I thought that could get the prefabs orientation ...

anyway thanks for your time.

-----------------------------------------

another thing , related to no pistol, no rifle -.....

could you translate to the Spanish :

PROJ NO
SPLASH NO

thanks.-[thumbs_up]
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11559
Last: Oct 4, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD2 Scripting
Posted: Sunday, Jun. 15, 2008 06:48 am
I don;t speak spanish.

But PROJ_NO is turn projectile damage off.. like grenades and rockets.
SPLASH_NO is turn splash damage off, like when a grenade explodes close to the trigger.

alfabigo
General Member
Since: Jan 16, 2008
Posts: 50
Last: Jul 8, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Monday, Jun. 16, 2008 01:00 am
Thanks ....your help is much appreciated.

by...[thumbs_up][2guns]
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting
All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
Intergi
Partners
Call of Duty Headquarters
The Firing Box
Frag Universe
modbase.be
CODAddicts - Call of Duty News & Downloads
Battle for Europe COD2
XoXide
Ask About
Advertising
Friends
Great Gamer
The Clan Database
Canada Kicks Ass Clan
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
• MODSonair Episode 154
• MODSonair Episode 153
• MODSonair Episode 152
• MODSonair Episode 151
• Video server move
Next Show
The next MODSonair show will air LIVE on:
11/23/2008 12:00 EST

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware