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

Members Online

»
0 Active | 26 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 2
Category: CoD2 MP Mapping
CoD 2 mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Triggers and FX
Flubber
General Member
Since: Jun 19, 2006
Posts: 51
Last: Jan 15, 2008
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Tuesday, Jul. 25, 2006 08:57 pm
Ok Ive been looking around and I know its possible to make doors and stuff but i need to go a bit further, for this map to be profected!

I want to be able to press f on a lantren I have hanging and have it drop to the grounnd in my hay, after like 3 sec I want a fire to start "Small" then after a while it gets bigger and bigger. Please direct me to a tut that may have similar things im asking for ty. help is much appreciated!
Share |
FlesyM
General Member
Since: Jul 24, 2005
Posts: 399
Last: Jan 24, 2008
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Wednesday, Jul. 26, 2006 02:52 am
it's the standard trigger-script approach, just like doors indeed. take a doors tutorial, and replace the door script_brushmodel by a lamp script_brushmodel or a script_model of a lamp. once the trigger gets triggered, do whatever you want with that lamp ... here's an algo:

wait till trigger
move lamp to ground
wait till movement done
start small fire thread
wait some amount of time
kill small fire thread
start medium fire thread
wait some amount of time
kill medium fire thread
start big fire thread

and you probably want to add some playsound lines in there as well.
Share |
Flubber
General Member
Since: Jun 19, 2006
Posts: 51
Last: Jan 15, 2008
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Thursday, Jul. 27, 2006 03:16 pm
ok since im a compleat noob and you obvisoly no what you are doing can you take me step by step.
Share |
Flubber
General Member
Since: Jun 19, 2006
Posts: 51
Last: Jan 15, 2008
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Thursday, Jul. 27, 2006 04:20 pm
excuse my last post let me see how far i can get...
Share |
FlesyM
General Member
Since: Jul 24, 2005
Posts: 399
Last: Jan 24, 2008
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Thursday, Jul. 27, 2006 04:25 pm
yeah well ... i don't really feel like writing the code for you :)
but take a look at the tutorial I made for exploding barrels. it is kindda similar to what you want to do.

feel free to post your code here if you got an error you don't understand.
Share |
Flubber
General Member
Since: Jun 19, 2006
Posts: 51
Last: Jan 15, 2008
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Thursday, Jul. 27, 2006 05:07 pm
ok, I just took a baby step I added my trigger n stuff, but my lamp isnt moving, here is my code.

Quote:
main()
{
maps\mp\_load::main();

// set background ambient noise
ambientPlay("ambient_mp_zombie");

game["allies"] = "american";
game["axis"] = "german";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["american_soldiertype"] = "normandy";
game["german_soldiertype"] = "normandy";

}

door_rotate1()
{
door1 = getent("lantren", "targetname");
trig1 = getent("lantren_trigger1", "targetname");
while (1)
{
trig1 waittill("trigger");
door1 rotateYaw(0,390,2,2);
door1 waittill("rotatedone");
wait (0);
door1 rotateYaw(0,0,2,2);
door1 waittill("rotatedone");
}
}
Share |
FlesyM
General Member
Since: Jul 24, 2005
Posts: 399
Last: Jan 24, 2008
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Thursday, Jul. 27, 2006 05:28 pm
i see .... well first thing I notice is the organisation of your script.

make a new .gsc file, name it "whatever". for the sake of the explanation, let's call it flubberLamp.gsc. put it in maps/mp, beside the mapname.gsc. that new gsc will be the lamp script.
in the mapname.gsc enter the following line right above the maps\mp\_load::main(); one :
maps\mp\flubberLamp::main();
this will start the lamp script when start your map.
in flubberLamp.gsc you will have :

main()
{
//whatever code
}

now please tell me you have C or Java basic knowledge or this will go nowhere [tongue]
Share |
FlesyM
General Member
Since: Jul 24, 2005
Posts: 399
Last: Jan 24, 2008
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Thursday, Jul. 27, 2006 05:31 pm
anyway it does look as if you have some knowledge ...

so put that doorrotate1() function you have there and put it inside the flubberLamp main() function and see what that does. previously, your script wasn't called at all, which explains why nothing happened.
Share |
Flubber
General Member
Since: Jun 19, 2006
Posts: 51
Last: Jan 15, 2008
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Thursday, Jul. 27, 2006 05:40 pm
Ohh ohhh [sad]
I did what you said now it wont run because ........

Quote:
******* script compile error *******
bad syntax: (file 'maps/mp/flubberlamp.gsc', line 4)
{
*


Here is my code now,

Zombie.gsc
Quote:
main()
{
maps\mp\flubberlamp::main();
maps\mp\_load::main();

// set background ambient noise
ambientPlay("ambient_mp_zombie");

game["allies"] = "american";
game["axis"] = "german";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["american_soldiertype"] = "normandy";
game["german_soldiertype"] = "normandy";

}


flubberlamp.gsc
Quote:
main()
{
flubberLamp main()
{
door1 = getent("lantren", "targetname");
trig1 = getent("lantren_trigger1", "targetname");
while (1)
{
trig1 waittill("trigger");
door1 rotateYaw(0,390,2,2);
door1 waittill("rotatedone");
wait (0);
door1 rotateYaw(0,0,2,2);
door1 waittill("rotatedone");
}
}


edited on Jul. 27, 2006 01:42 pm by Flubber
Share |
Dibbes65
General Member
Since: Oct 3, 2005
Posts: 89
Last: May 25, 2008
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Thursday, Jul. 27, 2006 05:56 pm
make it like this:

main()
{
flubberLamp

door1 = getent("lantren", "targetname");
trig1 = getent("lantren_trigger1", "targetname");
while (1)
trig1 waittill("trigger");
door1 rotateYaw(0,390,2,2);
door1 waittill("rotatedone");
wait (0);
door1 rotateYaw(0,0,2,2);
door1 waittill("rotatedone");
}

I think that would do the job...I'm no exellent scripter, but i think it should work...

[ohwell]
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 MP 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

»