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

Members Online

»
0 Active | 105 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: 2 things at once?
Ace008
General Member
Since: Jul 22, 2005
Posts: 738
Last: Jan 3, 2009
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Thursday, Jan. 5, 2006 06:53 pm
I have been at this for a couple days know trying to get this to work and I still can't do it. I have some wounded guys who are american's like lauramegan posted awhile ago, but here is my problem when I put them in my map it interfers with my last obj and won't work because their animation won't end. Here is part of my script:

thread end_level();
}
end_level()
{
iprintlnbold ("End the level");

mission_over = getent ("end_level_trigger","targetname");
objective_add(5, "active",&"NORMANDY_OBJ5", mission_over getorigin());
mission_over waittill ("trigger");

missionSuccess ("foy", true);

maps\normandy_anim::main();
maps\_utility::array_thread(getentarray( "stretcher", "targetname" ), ::stretcher_think);
}

stretcher_think()
{
org = self.origin;
angles = self.angles;
spawn = spawn ("script_model",(0,0,0));
spawn.origin = (org);
spawn.angles = (angles);
spawn.animname = self.script_noteworthy;
spawn [[level.scr_character[spawn.animname]]]();
spawn UseAnimTree(level.scr_animtree[spawn.animname]);
if (isdefined (level.scr_anim[spawn.animname]["death"]))
{
spawn animscripted("scriptedanimdone", org, angles, level.scr_anim[spawn.animname]["death"]);
return;
}
guy[0] = spawn;
thread maps\_anim::anim_loop(guy, "idle", undefined, undefined, self);
while (1)
{
spawn playsound ("cough");
wait (4 + randomfloat(10));
}
}

Is there anyway to make these two things happen at the same time?Please help guys this has been bugging me for days!!!!I don't want to take out the wounded guys but if I can't figure this out I am going to have to.

edited on Jan. 5, 2006 01:53 pm by Ace008
Share |
lauramaegan
General Member
Since: Aug 9, 2004
Posts: 630
Last: Feb 11, 2007
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Thursday, Jan. 5, 2006 09:28 pm
Have not looked into it but ..... can you delete the script models that are your wounded guys prior to hitting your trigger for the level end? Or is your objective to get though to the wounded guys?
Share |
Ace008
General Member
Since: Jul 22, 2005
Posts: 738
Last: Jan 3, 2009
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Friday, Jan. 6, 2006 01:19 am
Well the wounded guys are right by the end trigger. The objective it to meet up with your squad and I have a few guys walking around the wounded guys and a captain. I could always make it so you have to go inside a small house or something to meet the captain so the wounded guys are out of view. The only problem is after I complete the objective before the last and the wounded guys start their animation the last obj won't show and maybe some people won't know where to go although the map is really linear. So what should I do, I really need help with this.
Share |
lauramaegan
General Member
Since: Aug 9, 2004
Posts: 630
Last: Feb 11, 2007
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Friday, Jan. 6, 2006 01:36 am
Just wondering.... Have you tried to comment out the parts of the script for the wounded guys to see if the rest works without them? May be worth a shot. Just to verify where the problem is for sure.
Share |
BR3NTB
General Member
Since: Jun 20, 2004
Posts: 893
Last: Mar 3, 2006
[view latest posts]
Level 7
Category: CoDUO Mapping
Posted: Friday, Jan. 6, 2006 01:36 am
Quote:
Ace008: "Is there anyway to make these two things happen at the same time"?


Try This :


main()
{
maps\_load_gmi::main();
maps\normandy_anim::main();
maps\_utility::array_thread(getentarray( "stretcher", "targetname" ), ::stretcher_think);
thread end_level();
}


end_level()
{
iprintlnbold ("End the level");
mission_over = getent ("end_level_trigger","targetname");
objective_add(5, "active",&"NORMANDY_OBJ5", mission_over getorigin());
mission_over waittill ("trigger");
missionSuccess ("foy", true);
}

stretcher_think()
{
org = self.origin;
angles = self.angles;
spawn = spawn ("script_model",(0,0,0));
spawn.origin = (org);
spawn.angles = (angles);
spawn.animname = self.script_noteworthy;
spawn [[level.scr_character[spawn.animname]]]();
spawn UseAnimTree(level.scr_animtree[spawn.animname]);
if (isdefined (level.scr_anim[spawn.animname]["death"]))
{
spawn animscripted("scriptedanimdone", org, angles, level.scr_anim[spawn.animname]["death"]);
return;
}
guy[0] = spawn;
thread maps\_anim::anim_loop(guy, "idle", undefined, undefined, self);
while (1)
{
spawn playsound ("cough");
wait (4 + randomfloat(10));
}
}


[smokin]
Share |
Ace008
General Member
Since: Jul 22, 2005
Posts: 738
Last: Jan 3, 2009
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Friday, Jan. 6, 2006 02:54 am
Wooohoooo, it is working finally. Thanks a lot Br3nt[biggrin]!! Now I only have a a few more things to do with my map, hopefully I will release it very soon, sometime early next week probably. I have only one more question that maybe you could help with Br3nt. Awhile ago you gave me a script for getting a rifle as an obj, and it worked great I only had one problem. It only works if the player picks it up as his secondary weapon. Is there anyway I could make it so it doesn't matter if it is the players primary or secondary weapon? Here is the script you gave me:

thread objective_get_sniper_rifle();
}

objective_get_sniper_rifle()
{
rifle_obj = getent("sniper_rifle","targetname");
objective_add(3, "active", "Find and pick up a Sniper Rifle",getent("sniper_rifle", "targetname").origin);
objective_current(3);
thread check_progress();
}

check_progress()
{
while(3)
{
playerWeapon[1] = level.player getweaponslotweapon("primaryb");
if (playerWeapon[1] == "springfield")
{
wait 1;
thread objective_complete();
break;
}
else
{
wait 2;
}
}
}

Anyway thanks again Br3nt this has been a very big help[wave]!
Share |
BR3NTB
General Member
Since: Jun 20, 2004
Posts: 893
Last: Mar 3, 2006
[view latest posts]
Level 7
Category: CoDUO Mapping
Posted: Friday, Jan. 6, 2006 03:19 am
Quote:
Ace008:"Is there anyway I could make it so it doesn't matter if it is the players primary or secondary weapon"?


Yes there is...... I think This should Work.



objective_get_sniper_rifle()
{
rifle_obj = getent("sniper_rifle","targetname");
objective_add(1, "active", "Find and Pick Up a Sniper Rifle",getent("sniper_rifle", "targetname").origin);
objective_current(1);
thread check_progress();
}

check_progress()
{
while(1)
{
playerWeapon[1] = level.player getweaponslotweapon("primary");
playerWeapon[2] = level.player getweaponslotweapon("primaryb");
if (playerWeapon[1] == "springfield")
{
wait 1;
thread objective_complete();
break;
}

if (playerWeapon[2] == "springfield")
{
wait 1;
thread objective_complete();
break;
}
else
{
wait 2;
}
}
}


Isnt Scripting Fun
[smokin]
Share |
Ace008
General Member
Since: Jul 22, 2005
Posts: 738
Last: Jan 3, 2009
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Friday, Jan. 6, 2006 03:40 am
Thanks again Br3nt[biggrin]! I will try it out in the morning, I got to go study right now though. I wish I could figure this scripting stuff out. I might take some lessons on Java scripting at my Community College this summer would that help me with this scripting for COD? I know COD uses C++ scripting but they say I can't take that yet because I don't have enough credits. Ethier way though I intend to figure this stuff out. Thanks again Br3nt this has been a big help!


Ace008
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

»