I have this error right when the script calls a “alertentity cpspawnblob”:
G_Scripting: alertentity "cpspawnblob"
(classname = team_WOLF_objective)
doesn't have a "use" function
what I have is a forward spawn you can capture with a flag. If a team captures the flag, they get the spawn (phspawnblob) and another spawn (cpspawnblob) is activated for the other team to spawn at. At the start, no one has any of those spawns. Here is the script for the flag:
/*----------------------------------------------------------------------
| POWERHOUSE SPAWN FLAG
|-----------------------------------------------------------------------
|
| Slot Used for
| ==== ========
| 0 Flag owner: 0 = Axis 1 = Allies
*/
phflag
{
spawn
{
setstate phspawnblob invisible
setstate cpspawnblob invisible
accum 0 set 0
}
trigger axis_capture
{
setstate phspawnblob default
setstate cpspawnblob default
accum 0 abort_if_equal 0 // Abort if Axis already have it
accum 0 set 0 // Set Axis as current owner
wm_announce "Axis capture the Powerhouse!"
wm_announce "Allies establish outpost in the central building."
// *----------------------------------- vo ------------------------------------------*
// Voice messages here
// *---------------------------------------------------------------------------------*
// * Update obj here *
alertentity phspawnblob
alertentity cpspawnblob
}
trigger allied_capture
{
setstate phspawnblob default
setstate cpspawnblob default
accum 0 abort_if_equal 1 // Abort if Allies already have it
accum 0 set 1 // Set Allies as current owner
wm_announce "Allies capture the PowerHouse!"
wm_announce "Axis establish outpost in the central building."
// *----------------------------------- vo ------------------------------------------*
// Voice messages here
// *---------------------------------------------------------------------------------*
// * Update obj here *
alertentity phspawnblob
alertentity cpspawnblob
}
}
/*----------------------------------------------------------------------
| END POWERHOUSE SPAWN FLAG
|-----------------------------------------------------------------------
*/
Another thing, if the axis capture the flag first, i dont get the error because the script only makes the spawns visible. In that case, the flags apear correctly but the cpspawnblob doesnt work even if I select it!
phspawnblob and cpspawnblob are both the team_WOLF_objectives. cpspawnblob is set to def_allies and phspawnblob is set to def_axis. The phflag has for target all the team_bluespawn and team_redspawn around the phspawnblob.
Any ideas?