A question


(Kreator) #1

I’ve been trying to figure this out for like 2 hours now, picking apart other scripts and such, but to no avail. It may seem like a stupid question, I donno. What does a team_wolf_objective have to do with team_CTF spawns? I understand that it is needed to have one, but where are they linked to each other?

thanks for the help.


(d3coy) #2

http://simland.planetquake.gamespy.com//ldr1_1/samplemap07a.htm

Explained here quite clearly. :slight_smile:


(Kreator) #3

it was pretty clear what the wolf objective is for, but I still am not sure exactly how they are linked to the spawns?

maybe if i explain what I’m trying to do here it will help better.

I’m trying to make it so that Allies blow up a gate, then the spawn that axis currently uses now becomes the allied spawn. The problem is that as soon as Allies blow the gate, the game freezes, then I get an error along the lines of setautospawn: can’t find target

heres the script I’m using

gate

{
spawn
{
wait 200
constructible_class 3
}

death
{
setautospawn "Upper Spawn" 1
setautospawn "Axis Fallback Spawn" 0
wm_announce "Allies have breached the Gate"
}

}


(kamikazee) #4

The team_CTF entitities are automagically linked to the nearest team_wolf_objective, no need to worry about those as long as they are close enough to it.

The error you get with setautospawn is something else though. You need to check that the parameter for setautospawn is the same as the description key from the team_wolf_objective.

Eg:
You have a spawnpoint by placing a team_wolf_objective. Give it a key description with value “Forward Spawn”. Now you have to call:

setautospawn "Forward Spawn" 1

(Kreator) #5

ok now im not getting the error, it just doesn’t switch spawns now…
heres the script im using now:

gate

{
spawn
{
wait 200
constructible_class 3
}

death
	{
	wm_announce "Allies have breached the Gate"
	wait 200
	wm_announce "Allies have stolen the forward bunker"
	setautospawn "Upper Spawn" 1
	setautospawn "Axis Fallback Spawn" 0
	}

}

Once I blow up the gate in game, it says Allies have breached the Gate, then doesn’t say the second announcement and doesn’t change the spawns. the descriptions DO match up to the ones in radiant, so I’m still lost here :confused:

thanks for the help guys


(murka) #6

strange…
maybe its a bug that stops the script running(iv had some, caused by several problems). try making it different, or put in death trigger game_manager setspawn and in it put the things in death… just a guess


(kamikazee) #7

Now I think of it… It could be that wait statements in the death trigger abort the trigger altogether.
I’d rewrite the code to something like this:


game_manager {
    // Usual script in here ...
    trigger allies_get_bunker {
        wait 200
        wm_announce "Allies have stolen the forward bunker"
        setautospawn "Upper Spawn" 1
        setautospawn "Axis Fallback Spawn" 0
    }
}

gate
{
    spawn {
        wait 200
        constructible_class 3
    }
    death {
        wm_announce "Allies have breached the Gate"
        trigger game_manager allies_get_bunker
    }
}

(murka) #8

exactly what i thought


(Kreator) #9

Ok sweet its getting closer now, axis spawns at the Fallback spawn, and the messages pop up. Allies still spawn at the original spawn though… Maybe I haven’t set up the entities properly?

Upper spawn entities:

Bluespawn:
-Invulnerable
targetname upper_spawn

Redspawn:
-Invulnerable
-startactive
targetname upper_spawn

Objective
-default axis
targetname upper_wobj
description Upper Spawn
scriptname upper_wobj (not even sure if i need this one :P)

the problem it seems is that it is setting the allies to a spawn that they dont actually own… In game as axis I typed /setspawnpt 1 and it sent me back to the original spawn… How does allies actually acquire the spawn, alertentity?

Edit: I FINALLY got it … thanks for the help…

I just put alertentity upper_spawn in after the setautospawns and now it works fine… thanks for all your help guys