I am going crazy with this scripting of forwardspawnpoints


(Milbo) #1

Yoh,… scripting is really strange,…
first time I made a Forwardspawnpoint,… I tried to make it by my own,… I looked in examples tutorials and so on,… it doesnt worked,… later I copied a prefab of someone (posted here in the forum s. Sticky) and I changed only the name of the Spawnpoints,… Doesnt work. Do there have to be a Spawnpoint named “Axis Spawn” and “Allies Spawn” I changed the names and the flag worked again,… strange that,… Somedays ago I released my first version of the escaped. I wanted to fix the urgent probs,…
I want it like in Oasis,… But a bit more complex.
Axis have an Spawnpoint called “Axis Spawn”… If the Allies capture the flag,… Axis should lost their first Spawnpoint (“Axis Spawn”) und should get a new one (Axis Cave Spawn). If Axis capture the flag back they should start at the flag as normal,… THIS WORKS :slight_smile:
BUT
NOW i wanted to make it like in Oasis,… that if u blow up something (mainexit),… that the flag disapears and the allies spawn is forced to the flag. It works if noone gets the flag or if Allies have got the flag already

Strange I dont get the “trigger force_allied” working,… I AM GOING CRAZY HERE… I tried so many different ways :frowning: ,… first way is like SD did in Oasis:

dynobj1
{
spawn
{
wait 200
constructible_class 3
}
death
{
wm_announce “Main Exit blown up”
wm_objective_status 6 0 2 //Main Cave Exit
wm_objective_status 6 1 1
setautospawn “Getarnte Festung” 0
trigger forward_spawn check_obj
trigger forward_spawn force_allied
trigger r_spawnc kill //this kills the Cavespawn
trigger forward_spawn kill

}

}

forward_spawn
{
spawn
{
globalaccum 3 set 0 // 0-Axis, 1-Allied was accum
}

trigger axis_capture
{
	globalaccum 3 abort_if_equal 0 // do Axis own flag?
	globalaccum 3 set 0		//Axis own flag

	trigger game_manager axis_flag		
	alertentity t1081             //switch spawnentities
	wait 1000
}

trigger allied_capture
{
	globalaccum 3 abort_if_equal 1
	globalaccum 3 set 1

	trigger game_manager allies_flag
	alertentity t1081 
	
	setautospawn	"Forward Spawn"	1
	
	wait 1000
	trigger r_spawn kill //should remove the first Axispawn?
	kill faxsp         //should remove the Entity First Axispawn?

}
	trigger check_obj
{
	globalaccum 3 abort_if_equal 1 // Do Allied own the flag?

	wm_objective_status 		4 0 2
	wm_objective_status 		4 1 1

}

trigger force_allied
{
	globalaccum 3 abort_if_equal 1 // Do Allied own the flag?
	alertentity t1081
	
}

trigger kill
{
	remove
}

}

It shows the message that allies capture the flag,… u can select the flag as allies. But u cant spawn there,… I am depressed I dont understand that,…
ah yes next thing… . why not this way
dynobj1
{
spawn

death
{
[b] trigger forward_spawn allied_capture [b]
wm_announce “Main Exit blown up”
wm_objective_status 6 0 2 //Main Cave Exit
wm_objective_status 6 1 1
setautospawn “Getarnte Festung” 0
trigger r_spawnc kill //this kills the Cavespawn
trigger forward_spawn kill

}

}

Do I have to alertentity the flag too?? but why SD didnt have too in oasis,… I dont check it aarhgh :slight_smile:
Then I shouldnt need the check_obj and force_allied.
Next thing I dont understand,… I switched on a sound entity the globalflag,… .the sound entity is triggered by a trigger once (is an alert). So why it is not globally to hear?? Next thing I dont understand. Why i make sound and it works not,… I copied it from a prefab,… working??? Same flags and absolutely the same sound entity,… the copied (from a prefab) is workin?? the other not??

AHHHH yes and was means that failure during the Compile,…
Entity leaked

Yes not map leaked,… it is everytime another entity and if look for fixing there isnt a lot to fix???
PLz help me,… Mapping now for 5 months,… and read reaallly every tut and help and so on (understanding is another question :-))

Milbo


(Drakir) #2

This is what i did to work around the same problem.

add new spawnpoints at the same place for the team u wan tot have the spawn after the goal is done.

Set the spawns state to not active at start.
In the script at their “spawn” make them invisible.
After the goal is done alertenty their targetnames and delete all other spawns u dont want to have with “remove” in the script.

Like this:

town_spawn_axis // Axis spawnpoints in town, their targetname and scriptname.

{
spawn
{
wait 200
}

trigger kill
{
	remove
}

}

And in your flag part make a instance that removes the flag.

trigger kill
{
	remove

}

(Milbo) #3

Thanks :slight_smile:
Very fast
Great,… but my system worked on another way,… I FOUND THE PROB
I made a mistake,… found it thinking about it,…
If a player touch the flag,… the flag entity switches the Spawnentities for you,… so u dont have to switch it in the script. But my problem was that there wasnt any allied player touching the flag,. so I have to switch the Spawnentities by the script. I forgot the “alertentity oldcityspawns” in my case “alertentity t1”.

trigger force_allied
{
globalaccum 3 abort_if_equal 1 // Do Allied own the flag?
alertentity t1081
alertentity t1
}

But thanks anyway,. .removing them is a great idea for the other Spawn but i dont know it didnt work yet,… but later,…

shit little prob if noone got the flag first,… it doesnt work but I think this will be easier,… becuase before it was so unlogical for me errhmhh hehe :slight_smile:


(Milbo) #4

Grmbl if noone have the flag and I trigger the target entities,… I trigger both of them,… so Axis and Allies do respawn,…
grmbl,… what can I do now,… should I go your way? shit recompiling for new spawnpoints (onlyents compile seems to be buggy)


(Milbo) #5

Grmbl if noone have the flag and I trigger the target entities,… I trigger both of them,… so Axis and Allies do respawn,…
grmbl,… what can I do now,… should I go your way? shit recompiling for new spawnpoints (onlyents compile seems to be buggy).

Now I got it,… I gave the redSpawnentities a script and removed them (as u suggested),… but I didnt made extra spawns :slight_smile: (Entities are limited or not?)

Thanks Drakir

But I had to recompile with only entities and now i have a strange wand in the air (moving up down very slowly i think but i dont know for sure)… It isnt there if i compile normal with the SDradiant,…


(michi.be) #6

If you have problems with capturepoint scripting you should watch this little
Video-tutorial :smiley:

http://www.level-designer.de/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=164&page=1


(S.S.Heirpie) #7

We have had a great time testing this map…I cant wait till the final is out…


(S.S.Heirpie) #8

here is a link to the latest version of Milbos map…

Escaped


(Milbo) #9

Thanks for your help herpie :slight_smile:
Probably I will managed it to host the file by my own,…


(S.S.Heirpie) #10

yes but its better to get it out ,this is the 0.8 version, this is your latest version of this map… :clap: :clap: :clap:

PIE