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

Members Online

»
1 Active | 11 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: a little question for the pros
magdoom
General Member
Since: May 4, 2006
Posts: 172
Last: Nov 8, 2006
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Friday, Jul. 7, 2006 12:47 am
creat a "demos" folder in your cod2/main folder and put the demo inside of it
Now run the game, and at the main menu, open up the console (~) and type "/demo "

[devilishgrin]
Share |
FlesyM
General Member
Since: Jul 24, 2005
Posts: 399
Last: Jan 24, 2008
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Friday, Jul. 7, 2006 01:03 am
yup simply ~ demo nameofdemo
once you've placed it in main/demos

sorry I took that for granted playing in competitions...
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Friday, Jul. 7, 2006 01:19 am
Quote:
I read on IWNation that COD2 does not have setbounds,

Arghhhhh cod2 strikes again...
Now I remember why I couldn't be bothered with it, every time they bring out a new version it's missing usefull functions that the older versions had!!!
Even MOH AA/SH/BT had more scriptable functions then these.

Quote:
speaking of which... i'm not really about that clip spawning ... if I undertand correctly this would spawn an entity that has a certain size... but it wouldn't be a clip per say right ? and the player cannot go through that entity ?? (so like you said ...acting like a clip of some sort ?) also, is the function to set flags on a trigger setflag or setspawflag ? or rather the flags goes into the third argument to the spawn function ?


Yeah by setting setcontents(1); it makes the invisible enitity solid, but this blocks everything, similar to clipall texture.

As for spawnflags? I have used the third argument method ok in UO for spawning weapons, to make them respawn.

Here is a VERY usefull re-usable routine for spawning models, it could be adapted to spawn other things easy enough.

Quote:
main() {

precacheModel("xmodel/prop_firebarrel");

barrel1 = spawn_model("xmodel/prop_firebarrel", "B1", (0,0,0), (0,0,0));

}

spawn_model(model, targetname, origin, angles) {

if (!isdefined(model) || !isdefined(targetname) || !isdefined(origin))
return undefined;

if (!isdefined(angles)) angles = (0,0,0);

spawn = spawn ("script_model",(0,0,0));
spawn.origin = origin;
spawn setmodel (model);
spawn.targetname = targetname;
spawn.angles = angles;

return spawn;
}


Regards Grassy
Share |
nedgerblansky
General Member
Since: Jan 28, 2005
Posts: 57
Last: Nov 9, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Tuesday, Feb. 13, 2007 03:07 pm
Sorry to bump an old thread... [rolleyes]

Did you completely give up on the all-scripted method of handling a trigger_damage ?

I made some experiments, and I manage to make a trigger_damage react, but regardless of the distance of the explosion, as long as we can draw a clear line between the location of the explosion and the location of the trigger.
If there is an obstacle between, it won't react, which is fine.

So maybe we only lack the ability to give the trigger a "shape" or "dimensions" or whatever [confused]
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Friday, Feb. 16, 2007 07:30 pm
Yeah, good point nedgerblansky [thumbs_up]
I forgot about this thread after it came to halt so long ago.

As for your line of sight activation of other triggers?
I'm tipping it might have something to do with bulletTrace() ? :)

Perfect idea, it would not be very realistic if barrels around the corner of buildings took damage when they should be protected from a blast.
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Friday, Feb. 16, 2007 08:07 pm
Doh!

Didn't look too hard did we, he has it released already in the tutorials section.

Good work FlsyM [thumbs_up]
Share |
nedgerblansky
General Member
Since: Jan 28, 2005
Posts: 57
Last: Nov 9, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Saturday, Feb. 17, 2007 08:05 pm
I've seen this.
But I'm actually looking for a way to spawn a trigger_damage and make it react to damage, all by scripting only.
It's for modding purposes, not mapping.
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

»