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

Members Online

»
0 Active | 64 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
Category: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Breakable Windows & accumulate
locke19
General Member
Since: May 22, 2006
Posts: 20
Last: Oct 21, 2010
[view latest posts]
Level 1
Category: CoDUO Mapping
Posted: Monday, Oct. 18, 2010 05:45 pm
I'm usually able to find solutions by searching the forum, but not in this case.

I used the Breakable Windows tutorial:
http://modsonline.com/Tutorials-read-117.html

which works perfectly. I've got everying working exactly as i want, except I can't add a working accumulate key/value to the trigger.

If i put any value higher than 0.9 the trigger wont activate, anything lower and the trigger is activated by one shot. I would like it to activate after atleast 3-4 Kar98 rounds.

Any help is appriecated.



Share |
cskiller86
General Member
Since: Nov 23, 2009
Posts: 528
Last: Oct 25, 2011
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Tuesday, Oct. 19, 2010 08:06 am
This is how it's done in CoD4. I think it works in vCoD also.
Name the triggers "windtrig", then select each trigger and its corresponding window and connect them.
Name the broken windows "brokenwindow1", "brokenwindow2", "brokenwindow3" etc.

Code:
main()
{
	windfx = loadfx ("props/car_glass_large");//you'll have to change this FX to something from vCoD
	windtrigs = getEntArray("windtrig","targetname");
	for(i=0;i<windtrigs.size;i++)
		windtrigs[i] thread dowindow(i,windfx);
}

dowindow(windnumber,windfx)
{
	window = getent(self.target,"targetname");
	totaldamage=0;
	targetdamage=40;
	windowbroken=0;
	broken = getentarray("brokenwindow"+(windnumber+1),"targetname");
	for(j=0;j<broken.size;j++)
	{
		broken[j] notsolid();
		broken[j] hide();
	}
	window show();
	while(!windowbroken)
	{
		self waittill ("damage",amount);
		totaldamage+=amount;
		if(totaldamage>targetdamage)
		{
			windowbroken=1;
		}
	}
//        self playsound("glass_break");//uncomment this line and add your soundalias if you want to hear a sound when the window breaks
	PlayFX(windfx, self.origin );
	if(broken.size)
	{
		for(j=0;j<broken.size;j++)
		{
			broken[j] show();
		}
	}
	window delete();
	self delete();
}
Share |
locke19
General Member
Since: May 22, 2006
Posts: 20
Last: Oct 21, 2010
[view latest posts]
Level 1
Category: CoDUO Mapping
Posted: Tuesday, Oct. 19, 2010 04:38 pm
I'll give that a go later and let you know how i get on, I was hoping to avoid using scripting at all. (mostly out of lazyness)

I don't like to copy/paste unless i can understand what the script is actually doing, but that cod4 script looks pretty straight forward.

It does look like it should work in vCOD/UO. Thanks
Share |
locke19
General Member
Since: May 22, 2006
Posts: 20
Last: Oct 21, 2010
[view latest posts]
Level 1
Category: CoDUO Mapping
Posted: Thursday, Oct. 21, 2010 02:06 am
Yeah, it works well.

I used it to make destroyable crates rather than windows.

Strangely, the script doesnt seem to activate untill 20 seconds into the round. ie the trigger is indestructable at the start of the map. I can live with that though, but i dont see any "wait" lines in any of my maps script... very strange.

Thanks for your help.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoDUO Mapping

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

»