axis & allies , planting diffusing team

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
agentmad007
Brigadier General
Posts: 570
Joined: Tue Feb 24, 2004 3:52 pm

axis & allies , planting diffusing team

Post by agentmad007 »

Hi ,

I ve seen many time the Bjarne site (well done) ..But i cant find how to set axis and allies teams planting the bomb and diffusing them!

I d like to set the allies objectives to plant one bomb and to take the control of something. (like a bomb planted with the time etc to let other team the time to disable the allies control on that thing)

and axis to plant a bomb and setal a document .

so 4 obj in one map.

I know how to plant a bomb and steal documents(Bjarne website) but not for the 2 teams .

Someone can help me ???? Without making it Tug of War.

Thanks a million.
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

Hmm i dont think that is possible... but heck wadda i know, im a mapper :wink:
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

we need a sticky on this.

it's possible, but you need to reengineer your script files a tad, theres some otehr topics on this but i'm lazyand wont get links.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
agentmad007
Brigadier General
Posts: 570
Joined: Tue Feb 24, 2004 3:52 pm

Post by agentmad007 »

to tell the truth i did a search without success

No worries i can understand that you are Lazy to do a search for every topic that have been answered a Tons of times.

Many apologies.

i ll try again ;)
Splaetos
Major General
Posts: 730
Joined: Tue Jan 20, 2004 2:55 pm
Contact:

Post by Splaetos »

defusing, planting, and all manner of bomb behavior is controlled in obj_dm.scr

if you want BOMBS for each team to set and explode(while thier enemies can defuse) then you just have to modify and duplicate the script, renaming them appropriately. There are at least a few topics devoted to this... I know ive posted in em alot =)

If you want to use triggers that can be set or defused that dont cause explosions you need a different script, but built along the same lines as obj_dm.scr Basicaly the difference is, you need the defusing and setting info in them, but not the explosions behaviors... if its not a bomb... you have to decide whatever else its supposed to do, and have it do that instead.

I will edit in some topics changing the bomb setting teams was in... Im not sure exactly what you intend though.

viewtopic.php?t=8349&highlight=objdm

Look at the obj_dm.scr, it will show you tons about how objectives work. Setting and defusing bombs is only a one team thing in stock maps BECAUSE this script was set up to take the planting and defusing team variables and work off that. With small modifications, you can have either team control bombs however you like. Same for triggered objectives, though in that case you will have to script whatever you want your objective to do.

For instance... CTF maps are basicaly bombs that one team can set and the other defuse, except they dont blow up,, they jsut place a flag, or move a flag or whatever the case may be.
When I am king, you will be first against the wall~
Image
agentmad007
Brigadier General
Posts: 570
Joined: Tue Feb 24, 2004 3:52 pm

Post by agentmad007 »

yeah thx spleetos i ve seen that post yesterday night , learnt some good things thx .

i will even see in details this CTF script , thought exactly the same when i was sleeping LOL ...

Thx for the help
agentmad007
Brigadier General
Posts: 570
Joined: Tue Feb 24, 2004 3:52 pm

Post by agentmad007 »

Code: Select all

level waitTill prespawn 
thread global/exploder.scr::main 

level waitTill spawn 
level.clockside = kills // or draw if you want (allies, axis, kills, draw) 

$axisbomb thread global/axis_obj.scr::bomb_thinker 
$alliesbomb thread global/allied_obj.scr::bomb_thinker 

thread axis_victory $axisbomb 
thread allies_victory $alliesbomb 
end 

axis_victory local.axisbomb: 
while (local.axisbomb.exploded != 1) 
{ 
waitframe 
} 
teamwin axis 
end 


allies_victory local.alliesbomb: 
while (local.alliesbomb.exploded != 1) 
{ 
waitframe 
} 
teamwin allies 
end 

can i mix it with stolen documents ?

Code: Select all

level waitTill prespawn 
thread global/exploder.scr::main 

level waitTill spawn 
level.clockside = kills // or draw if you want (allies, axis, kills, draw) 

$axisbomb thread global/axis_obj.scr::bomb_thinker 
$alliesbomb thread global/allied_obj.scr::bomb_thinker 
////////////stealing documents///////////////
$allies_document thread document_check1
$axis_document thread document_check2
/////////////////////////////////////////////////

thread axis_victory $axisbomb 
thread allies_victory $alliesbomb 
end 

axis_victory local.axisbomb: 
while (local.axisbomb.exploded != 1)  && (local.axisdocument !=1)
{ 
waitframe 
} 
teamwin axis 
end 


allies_victory local.alliesbomb: 
while (local.alliesbomb.exploded != 1) && (local.alliesdocument !=1)
{ 
waitframe 
} 
teamwin allies 
end 

document_check1:
	while(1) { // forever
		// Dont execute past this line
		// until someone triggers the object
		self waittill trigger
		// parm.other is the triggerer
		if(parm.other.dmteam == allies) {
			// Make the document graphix disappear
			self.target hide
			// Tell the win method that an
			// objective has been completed
			level.targets_destroyed ++ // ++ adds 1
			break // out of while loop
		}
		waitframe // protection
	}
end

document_check2:
	while(1) { // forever
		// Dont execute past this line
		// until someone triggers the object
		self waittill trigger
		// parm.other is the triggerer
		if(parm.other.dmteam == allies) {
			// Make the document graphix disappear
			self.target hide
			// Tell the win method that an
			// objective has been completed
			level.targets_destroyed ++ // ++ adds 1
			break // out of while loop
		}
		waitframe // protection
	}
end

would it be correct or can someone point me on a right way .
Splaetos
Major General
Posts: 730
Joined: Tue Jan 20, 2004 2:55 pm
Contact:

Post by Splaetos »

im not certain but...

will local.axis_document work?

local works within a thread right? but no information has been passed to the win threads telling them what local.axis_document is... I could be wrong tho =)
When I am king, you will be first against the wall~
Image
agentmad007
Brigadier General
Posts: 570
Joined: Tue Feb 24, 2004 3:52 pm

Post by agentmad007 »

thats exactly my question spleetos lol :p .

is there a way then to declare the 2 objectives.I just guessed the script above , but i am 100 % sure it is wrong .

maybe a charitable soul will come toward me :D

thx for your replies.
Splaetos
Major General
Posts: 730
Joined: Tue Jan 20, 2004 2:55 pm
Contact:

Post by Splaetos »

umm you can just use different variable.

like you could use a level.variable

level.axis_documents_stolen = 0 -- thats to start before they are stolen.

in the thread where they can be stolen it becomes:

level.axis_documents_stolen = 1 -- as soon as they are stolen.

then in the victory thread if the variable = 1 it can go on.


the win thread can be written however you want, as long as it gets the necessary info.


also you might wnat to check out the map Watten by... umm ... i forget....

that map the allies steal 2 docs and blow up something before they win.
When I am king, you will be first against the wall~
Image
agentmad007
Brigadier General
Posts: 570
Joined: Tue Feb 24, 2004 3:52 pm

Post by agentmad007 »

well it is done i just created another golbad/obj_dm.scr i set it up to not play all bomb animation and it work fine ;)
Post Reply