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
mag96 [Proje]
joemax [Downl]
Blimp01 [Forum]
Papik [Forum]
elim [Forum]
Sgt.Rampage [Forum]

6 Members and 6 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Monday, Dec. 1st
A message from foyleman
Sunday, Nov. 30th
MODSonair 156 Live
Friday, Nov. 28th
MODSonair Episode 155
Wednesday, Nov. 26th
MODSonair Forum Buttons
Monday, Nov. 24th
Holiday Gift Guide 2008 - PC
Latest Poll
Single or Multiplayer maps for World at War?
Single-Player 29.55%
Multiplayer 62.5%
WHAT!? The tools are out? 7.95%
Read More...
10 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
nazi_zombie problem with map : (
CoD:WW Level Des.. Posts: (4) Views: (48) by Papik
Appreciation
MODSonline.. Posts: (5) Views: (38) by Rasta
if your map switches to airfield read this !
CoD:WW Level Des.. Posts: (2) Views: (19) by darkcod5
GSC FTL
CoD:WW Level Des.. Posts: (3) Views: (23) by elim
Google 468 Banner 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 4
Category: CoD 4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, rEdrUmMDK, Foxhound, Rasta, StrYdeR, The_Caretaker, batistablr, playername, Welshy
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: Hide bombzone
acaymo
General Member
Since: Sep 8, 2008
Posts: 10
Last: Oct 18, 2008
[view latest posts]
Level 0
Category: CoD 4 Scripting
Posted: Sunday, Oct. 12, 2008 10:09 pm
On SD, when bomb explodes, how can I hide the models, because in the map I'm making, when it happens, the bridge where is situated both bombzones (A and B), blows up, and some parts of it dissapears.
But bombzones still remain, and its looks so strange...bombs floating in the air.

I've tryed this, but dont hide them:(destroyed and previous are brushmodels of the bridge)

main()
{

destroyed=getent("bridgeafter","targetname");
previous=getent("bridgebefore","targetname");
bombZones = getEntArray( "bombzone", "targetname" );
destroyed hide();

while(!level.bombexploded)
wait 0.05;


bomb_origin = (-1974, 1439, 100);
earthquake(0.3, 3, bomb_origin, 2500);
radiusDamage(bomb_origin, 480, 1000, 1000);
playFx( level._effect[ "bridge_bum_fx" ], ("bridge_bum_origin"));
destroyed Show();
bombZones delete();
previous delete();

}




Tally
General Member
Since: Apr 21, 2005
Posts: 199
Last: Dec 2, 2008
[view latest posts]
Level 4
Category: CoD 4 Scripting
Posted: Thursday, Oct. 16, 2008 09:39 pm
After your bridge has been destroyed:


Code:


That moves the bombzones down into your map and effectively hides them.
acaymo
General Member
Since: Sep 8, 2008
Posts: 10
Last: Oct 18, 2008
[view latest posts]
Level 0
Category: CoD 4 Scripting
Posted: Friday, Oct. 17, 2008 09:58 am
Thankd, I have changed my script because for a strange reason, my minimap dont shows on all gametypes except SD, and in it, only after the bomb has exploded...

I solved that with these changes, but now, when the bomb explodes, the bridge dont hides, dont go down (with the script you wrote) and the icons of the bomb and the bombzones dont shows in the minimap.

Here is my montargis4.gsc:

main()
{

maps\mp\_load::main();

maps\mp\mp_montargis4_fx::main();
maps\createfx\mp_montargis4_fx::main();
maps\mp\_custom_structs::main();
maps\mp\mp_montargis4_soundfx::main();
maps\mp\planes::main();
maps\mp\_explosive_barrels::main();

maps\mp\_compass::setupMiniMap("compass_map_mp_montargis4");

ambientPlay("ambient_middleeast_ext");

destroyed=getent("bridgeafter","targetname");
destroyed hide();

game["allies"] = "sas";
game["axis"] = "russian";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["allies_soldiertype"] = "woodland";
game["axis_soldiertype"] = "woodland";

setdvar("r_specularcolorscale", "1" );

setdvar("r_glowbloomintensity0", ".25" );
setdvar("r_glowbloomintensity1",".25");
setdvar("r_glowskybleedintensity0",".3");
setdvar("compassmaxrange","2000");

level.airstrikeHeightScale = 1.1;

if(getDvar("g_gametype") == "sd")
{
maps\mp\bridge_bomb::int();
}
}

And here the bridge_bomb.gsc (y changed the name, too):

#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;


int()
{
thread watchbomb();
}

watchbomb()
{
previous = getent("bridgebefore","targetname");
bridge_bum_origin = getentArray ("bridge_bum_origin","targetname");
bombZones = getentArray("bombzone","targetname");
destroyed = getent("bridgeafter","targetname");
destroyed hide();

level waittill("bomb_planted");

while(!level.bombExploded)
wait .05;
bomb_origin = (-1974, 1439, 100);
earthquake(0.3, 3, bomb_origin, 2500);
radiusDamage(bomb_origin, 480, 1000, 1000);
playFx( level._effect[ "bridge_bum_fx" ], ("bridge_bum_origin"));
destroyed Show();
previous hide();
bombZones movez(-900, 0.05);
}
Sevenz
General Member
Since: Apr 24, 2006
Posts: 1133
Last: Nov 28, 2008
[view latest posts]
Level 8
Category: CoD 4 Scripting
Posted: Friday, Oct. 17, 2008 01:37 pm
you call movez on an array. imo it can't work. try this instead:


Code:



and instead of :
while(!level.bombExploded)
wait .05;

you could use waittill() to wait for the internal "explode" message (don't know how it is called)
acaymo
General Member
Since: Sep 8, 2008
Posts: 10
Last: Oct 18, 2008
[view latest posts]
Level 0
Category: CoD 4 Scripting
Posted: Friday, Oct. 17, 2008 07:18 pm
Thanks Sevenz, but movez gives me an error, it says :

error:
potential infinite loop at line ....
for (i=0; i

For other things that happens, I have solved with a .....rude method... I have copied sd.gsc (maps/mp/gametypes/) and renamed to bridge_bomb.gsc and added at the part when the bomb explodes my sript that hides the bridge and plays the fxs.....

And it works!!! LOL,

The only thing that still remains are the bombZones...

Thanks again
Sevenz
General Member
Since: Apr 24, 2006
Posts: 1133
Last: Nov 28, 2008
[view latest posts]
Level 8
Category: CoD 4 Scripting
Posted: Saturday, Oct. 18, 2008 07:15 am
does this solve the infinite loop error?


Code:
acaymo
General Member
Since: Sep 8, 2008
Posts: 10
Last: Oct 18, 2008
[view latest posts]
Level 0
Category: CoD 4 Scripting
Posted: Saturday, Oct. 18, 2008 08:47 pm
Thanks,

Well, the looping error dont show any more, but nothing happens.
I think that the problem is that I'm moving or hidding only the trigger, not the model.
I opened sd_bombzone_nuke_a.map and "bombzone" is the trigger_use_touch targetname.... so if i'm moving or hidding something, is the trigger.

The two models that correspond to the bomb and the bomb destroyed, wich are what I want to hide, have "auto1" and "exploder" as targetname.

So I've tried using other key to call them:
bomb1 = getent ("com_bomb_objetive","model");
bombdest = getent ("com_bomb_objetive_d","model");

When i use bomb1 hide() and bombdest hide(); I have this error:

undefined is not an entity

When i use your last script ....if isdefined.....for b=0..self movez...
gives no error, but nothing happens
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 4 : CoD 4 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
Battle for Europe COD2
The Firing Box
CODAddicts - Call of Duty News & Downloads
Call of Duty Headquarters
modbase.be
XoXide
Frag Universe
Ask About
Advertising
Friends
Volcano
CoD 4 Base
After Life Gaming
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 155
MODSonair Episode 154
MODSonair Episode 153
MODSonair Episode 152
MODSonair Episode 151
Next Show
The next MODSonair show will air LIVE on:
12/07/2008 12:00 EST

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