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

Members Online

»
0 Active | 105 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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: Script problem
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Saturday, Dec. 19, 2009 03:20 pm
tomv8 writes...
Quote:
k it works but u really should fix this line

Give the door the following value. It must be one or the other (90 or -90). This tells the door which way to open, towards you or away from you. Towards and away, depend on the position of the door in Radiant, on it's X and Y axis. I usually just assign it a 90 value, then when I run the map, if the door opens the direction I want, I leave it. If it doesn't, I change it to -90.

Give the door the following value. should be give the TRIGGER the following value. :)


I don't think I can edit it. Anyways, there are plenty of key words to tell you that you never left having the trigger selected, and you are still giving it values in the entity editor.


===========
While the trigger only is selected, press "N" and give it the following values.
Key: targetname
Value: door_trig


"door_trig" is the targetname we are using in our script.


You can also give the trigger some hintstring values if you want. This one pops up the text, "Press [ ] To Use" If the player uses the key Q for his use key, then it would say "Press Q to Use"


Key: hintstring
Value: PLATFORM_HOLD_TO_USE


And/or you can give the door that little white hand that pops up.
Key: cursorhint
Value: HINT_ACTIVATE



We need to also tell this trigger which way we want the door to open. Will it open 90? or -90? or whatever. This script allows you to give different doors different values of rotation. One script can work on any door in your map and it can open any direction. This value must be added! The script needs to know a value for "count".

Key: count
Value: 90


Give the door the following value. It must be one or the other (90 or -90). This tells the door which way to open, towards you or away from you. Towards and away, depend on the position of the door in Radiant, on it's X and Y axis. I usually just assign it a 90 value, then when I run the map, if the door opens the direction I want, I leave it. If it doesn't, I change it to -90.

Remember, the value DOES NOT have to be 90, it can be really any number under 180. 90 is simply a right angle. Know your angles if you are going to be using other numbers.


So now the trigger is set up, only thing left to do is link the trigger to the door and hinge, and since the door and hinge is already one script_brushmodel family, we simply First select the trigger, then just one piece of the door, and press "W".
A Blue LINE with an arrow pointing from the trigger to the door should now be visible. And all brushes should suddenly be selected. All parts of the door, the hinge, and the trigger. If you can't see the line, then just pull the trigger away from the door to make sure it exists, then move it back.
============


Quote:
The reason it says "give the door the following value" is because you are technically telling the trigger to tell the door how far to open, so you are giving the door the following value. I think the reason it is confusing is because this is the first script you set up. Once you get into the groove of setting things like this up, the terms come much more easily, and you won't need tutorials to help you along. I do see your point, and if I could edit it, I would but I can't.
[rolleyes]
Share |
tomv8
General Member
Since: Oct 5, 2008
Posts: 469
Last: Jul 14, 2010
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Saturday, Dec. 19, 2009 04:02 pm
you broke my brain :|
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

»