[QUOTE=stealth6;505345]First off you should use
tags for our script, then it keeps indentation.
what's going on here:
alertentity blast
wait 500
setstate blast invisible
Afaik an entity either works with setstate OR alertentity? I could be wrong though... Maybe try:
setstate blast default
wait 500
setstate blast invisible
[/quote]
When I did that, the trigger_hurt did not work when the rocket landed in the building. The reason is that the trigger had "start_off" flag attached to it. But when I removed the "start_off" the trigger was visible even without the rocket. So what I did, I removed the start_off flag, and I added one line under game_manager i.e. setstate blast invisible. So now when the rocket lands, we have setstate blast default, wait 500 and invisible again. It works fine.
It worked fine with both alertentity and setstate, but I guess it is better to keep things the same, rather than mixing stuff up.
> I'm not sure how kill <entity> works, but I don't see "death" defined for rocket. I think kill triggers death? I'll take a stab at it:
> ```
> rocket
> {
> spawn
> {
> wait 200
> gotomarker rocket_pc2 1000
> }
> trigger move
> {
> wait 5000
> playsound sound/weapons/rocket/rocket_fly.wav looping forever
> gotomarker rocket_pc1 1000
> wait 1600
> alertentity roofexplosion
> stopsound
> playsound sound/weapons/rocket/rocket_expl.wav
> kill rocket
> alertentity blast
> wait 500
> setstate blast invisible
> }
>
> death
> {
> setstate rocket invisible
> }
> }
> ```
So I have kill <entity> somewhere in the map and it works fine...Also it worked for the rocket until I added extra lines to it....
The above code does not work either, agrh! :P