Page 2 of 2
Posted: Mon Aug 16, 2004 8:25 pm
by Splaetos
well that one is for allies setting, you have to change it for axis setting.
you seemed to have it set up right with global\obj_dm_axis etc...
so the one above would be global\obj_dm_allied and then you can jsut reverse all the team names for the other.
Your victory conditions might require additional coding as well. Mostly you can just use self.exploded if you need to know if its gone off or not, so not much of a problem.
If bomb1.exploded = 1 <-- (is my syntax correct here? assuming bomb1 was what was sent as self of course...)
then it has been detonated.
Posted: Mon Aug 16, 2004 8:37 pm
by GARRAPIGNADO
The winning conditions are my other problem.
I though in what you say, but I don't know to create that variable: one called allies_boom and other axis_boom (for example) with initial value 0 and, set to 1 when explode (in the good obj_dm copy), and how to compare to set the winner (in the map scr).
And: what you recomend when time's up? Can I make win by kills (as in DM)? Or it's automatic?
Thanks

Posted: Mon Aug 16, 2004 10:25 pm
by Splaetos
if first bomb to blow wins....(this isnt a complete script of course)
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/obj_dm_axis.scr::bomb_thinker
$alliesbomb thread global/obj_dm_allies.scr::bomb_thinker
thread axis_victory
thread allies_victory
axis_victory:
while ($axisbomb.exploded = 0)
{
waitframe
}
Teamwin Axis
end
allies_victory:
while ($alliesbomb.exploded = 0)
{
waitframe
}
teamwin allies
end
not positive if that will work, someone please correct me if it wont =)
$bomb.exploded should maintain its value across threads right?
Posted: Tue Aug 17, 2004 8:16 am
by GARRAPIGNADO
I think it won't work because you say that: "while bomb doesn't explode, the team wins".
I think it will be better something like that (for example, to axis):
Code: Select all
axis_victory:
if ($axisbomb.exploded = 1)
{
waitframe
teamwin axis
}
end
but, How can I set exploded to 1? It may be set to 0 at starting.
Posted: Tue Aug 17, 2004 11:53 am
by GARRAPIGNADO
Ok, forget my last post, it's wrong.
One thing: where can I find a map like I want? I would see its scripts and its globals. A map where two teams have to plant a bomb to win.
Thanks

Posted: Tue Aug 17, 2004 12:28 pm
by jv_map
For conditions, use == instead of =
= -> assignment, set a variable to some value.
== -> equal, returns 1 if the values before the == and after are equal, 0 otherwise.
Posted: Tue Aug 17, 2004 1:54 pm
by GARRAPIGNADO
Yes jv_map, you're all right!
So, there is another problem: When I start the map, allies win automatically at 2 seconds, jejejjejejeeje. It's too easy!
I only have the win conditions of Splaetos.
It will happen with axis if I change the order of the winning threads. Do I need another condition? What's wrong in those?
Thanks, I'm learning a lot!
Posted: Tue Aug 17, 2004 2:59 pm
by GARRAPIGNADO

It worksssss
I found a map with this system, and I loooked its script. I copied using my targetnames, and works fine.
Here is the code:
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
Thanks all of you for your help!!!! I only needed some push, jejejeje.
Posted: Wed Aug 18, 2004 12:13 am
by Splaetos
sorry, the = instead of == was a typo =p