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

Members Online

»
0 Active | 22 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 SP Mapping
Call of Duty 2 single player mapping, scripting and everything single player.
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: again the mission objectives :S
Hoesjma
General Member
Since: Aug 7, 2007
Posts: 193
Last: Jan 18, 2009
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Friday, Jan. 16, 2009 02:27 pm
ok, so i followed the tutorial of retrieving the documents on the cod section and i got that working, but i want instead of picking up documents, picking up a weapon and able to use it, because know i just pick up the weapon and it disappears as i ''retrieve'' it. how do i change it so i can actually use the rifle?
Share |
tomalla
General Member
Since: Jan 16, 2007
Posts: 393
Last: Jun 10, 2012
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 SP Mapping
Posted: Friday, Jan. 16, 2009 03:38 pm
Code:
mosin = getent("mosin_obj","targetname");

objective_add(1, "active", "Pickup Mosin Nagant", mosin.origin);
objective_current(1);

while(!level.player hasweapon("mosin_nagant"))
	wait .1;

objective_state(1,  "done");


... and that's all! You have weapon ( in this case MosinNagant ) with targetname "mosin_obj" ( without quotes of course ). Game is waiting, unless he will pickup any MosinNagant and then - mark objective as "done". [thumbs_up]
Share |
Hoesjma
General Member
Since: Aug 7, 2007
Posts: 193
Last: Jan 18, 2009
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Friday, Jan. 16, 2009 04:06 pm
ok thats not working.. i changed all the names in your script to springfield and now i cant pick the weapon up anymore, its meant to pick up a specific weapon not a random one.
Share |
tomalla
General Member
Since: Jan 16, 2007
Posts: 393
Last: Jun 10, 2012
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 SP Mapping
Posted: Friday, Jan. 16, 2009 04:11 pm
First of all: what will your objective be? "Pick up Springfield", right? Will you have more than one Springfield or only one? If still one, code should look like this:

Code:
springfield = getent("springfield_obj","targetname");

objective_add(1, "active", "Pickup Springfield", springfield .origin);
objective_current(1);

while(!level.player hasweapon("springfield"))
	wait .1;

objective_state(1,  "done");


If you have more than one, and you want player to pick up specific weapon, it's more difficult. But possible.
Share |
Hoesjma
General Member
Since: Aug 7, 2007
Posts: 193
Last: Jan 18, 2009
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Friday, Jan. 16, 2009 04:13 pm
yes just 1 weapon, but i can't pick up the weapon when im near it, it gives the hintstring message but i cant pick it up :S
Share |
tomalla
General Member
Since: Jan 16, 2007
Posts: 393
Last: Jun 10, 2012
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 SP Mapping
Posted: Friday, Jan. 16, 2009 04:15 pm
Does it work without my code? Can you pickup Springfield without my code added?
Share |
Hoesjma
General Member
Since: Aug 7, 2007
Posts: 193
Last: Jan 18, 2009
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Friday, Jan. 16, 2009 04:16 pm
yes but im not wielding the weapon then, i just pick it up as a document u know.
Share |
tomalla
General Member
Since: Jan 16, 2007
Posts: 393
Last: Jun 10, 2012
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 SP Mapping
Posted: Friday, Jan. 16, 2009 04:17 pm
Do you have any other scripts included? If you do, post your whole script.
Share |
Hoesjma
General Member
Since: Aug 7, 2007
Posts: 193
Last: Jan 18, 2009
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Friday, Jan. 16, 2009 04:23 pm
this is what i got now:

main()
{
maps\_flak88::main("xmodel/german_artillery_flak88");
maps\_load::main();
maps\poep_fx::main();

level.player takeallweapons();
level.player giveWeapon ("m1garand");
level.player giveWeapon ("thompson");
level.player giveWeapon ("fraggrenade");
level.player switchToWeapon ("m1garand");

springfield = getent("springfield_obj","targetname");

objective_add(1, "active", "Pickup Springfield", springfield .origin);
objective_current(1);

while(!level.player hasweapon("springfield"))
wait .1;

objective_state(1, "done");


}
Share |
tomalla
General Member
Since: Jan 16, 2007
Posts: 393
Last: Jun 10, 2012
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 SP Mapping
Posted: Friday, Jan. 16, 2009 04:34 pm
The same code works for me. I don't know what's going on ...

1. With my code you can't pick up Springfield
2. Without my code you can pick it up but not add to you inventory.

I don't know, why is it happening. Our last hope is with your map. Maybe there are entities, which lock down some functionalities of a game script? But I don't think so, sorry.
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 SP 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

»