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

Members Online

»
0 Active | 8 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
Page
Previous Page
subscribe
Author Topic: Moving a brush by shooting a trigger
ArmorMaster
General Member
Since: Mar 30, 2005
Posts: 371
Last: Oct 3, 2009
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Friday, Aug. 11, 2006 08:13 pm
I don't know if this will help but I was making a trigger_damage play a sound for a tutorial map. When I shot at it from a distance, the sound didn't play. But when I shot at it when I was close to the trigger_damage, the sound played. The sound would only play if I was close enough to the trigger_damage, yet it wouldn't work if I was too far away.

What I did was adjusted the volume distance of the sound in the .csv file, which did the trick. I don't know if that'll help anyone...

Worst case you can always go over to IW nation and ask them...
Share |
hereticia
General Member
Since: Jun 16, 2006
Posts: 31
Last: Apr 16, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Aug. 11, 2006 08:19 pm
Glad to know that I am not crazy and that other people have experienced the same thing. Because of this and also not being able to move trigger brushes around I think I'm going to put a hold on my project which was to make Chess. I was going to have the players stuck inside floating boxes on each end of the board, and have a mounted gun that they'd use to pick pieces to move and destinations by shooting at them.
[sniper]

I keep waiting for a game that has scripting that works sufficiently well and isn't too convoluted that I can really make any kind of mini-game that I want (battle chess for example). I've tried with Warcraft 3 and now COD2 but still no dice.

edited on Aug. 11, 2006 04:21 pm by hereticia
Share |
sentchy
General Member
Since: May 6, 2006
Posts: 212
Last: Oct 31, 2006
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Friday, Aug. 11, 2006 08:20 pm
ArmorMaster,

A common use of a moveable trigger is the SD trigger that gets moved around. To be able to move something in script it needs to be an entity, it does not necessarily have to be a script_brushmodel. You can verify if something is an entity by going into the .map file with a text editor.

I pasted in a segment of the sd.gsc comments:

Code:
Bomb:
classname		trigger_lookat
targetname	bombtrigger
script_gameobjectname	bombzone
This should be a 16x16 unit trigger with an origin brush placed so that it's center lies on the bottom plane of the trigger.
Must be in the level somewhere. This is the trigger that is used when defusing a bomb.
It gets moved to the position of the planted bomb model.


Here is the code that moves the bombtrigger:

Code:
bombtrigger = getent("bombtrigger", "targetname");
bombtrigger.origin = level.bombmodel.origin;


Just create a trigger and an origin brush next to each other, then turn them into an entity, similiar to the bombtrigger one for SD.

Share |
bionicnipple
General Member
Since: Nov 24, 2005
Posts: 4
Last: Sep 9, 2006
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Saturday, Aug. 12, 2006 05:26 pm
I am Skyguy's "colleague". He is correct - some triggers worked some didn't. It seemed fairly random. They were all the same size and at various distances from the player.

What ended up working is that I did two things. I made the damage triggers larger (32x128), but then partially concealed them behind a wall so they weren't too big of a target for theplayer. Second I made sure my targets weren't intersecting any other brushes.

Now they all seem to work fine (and there are a lot). How this helps you guys out.

-nip
Share |
Restricted Access Topic is Locked
Page
Previous Page
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

»