Is it possible that an entity is only triggered by a single person which carries an objective?
the tutorials i read couldnt give me enough information to figure it out.
i want that only the person carrying the objective is allowed to be accelerated by a target_push?
the objective shouldnt be dropped because there are more accelerate-pads the person should be allowed to trigger. But the obj is droppable at the forward spawn. so the person isnt accelerated anymore.
need-a-help!^^
entities which effekt only on certain persons
thanks a lot.
can i disable a target_shooter until a func_invisible_user has been activated?
so not one person is accelerated but not all from beginning of the map.
On your last question, yes you can.
Simply make the target_shooter entity invisible at map start (a simple “setstate <targetname> invisible” command in the game_managers’ spawn scriptblock will do the trick) and make it default (visible) when the f_i_u is activated (“setstate <targetname> default”).
(Btw, is it really a target_shooter that shoots players? I thought it was a target_push… Maybe a typo)
oops… it is a target_push off course… i wrote only a mistake ^^
thank you for the answer
… is treid it with a obj and flagonly_multiple first… perhaps i find something to do with the obj ^^
any ideas? Oo some unimprotant funny things, because i dont want to delete it becaus i have built it yet ^^
another question; i cant deal with accum an such things yet…
i want the target_push entities to be set to invisible again when i activate the same invisible user entity…
can you explain to me howthis would work?
It was a long time ago I scripted something like this but I can try.
I’ll try to explain it as detailed as I can.
Usually, in a ‘normal’ script or code, you would do an If/Then command to see if the target_push was visible at this time or not. For example, something like “If target_push.IsVisible = True Then …”
Unfortunately, ET scripting cannot use conditional commands like this.
Instead, you can use a little trick with accums, which you can see as variables.
You simply assign the target_push entity state (invisible or default) an accum, lets say accum 0.
Then you define for yourself a value for ‘invisible’ (let’s say 0) and one for ‘default’ (let’s say 1).
So, right behind the “setstate <targetname> invisible” command you set accum 0 to 0 (“accum 0 set 0”) to correspond with an invisible target_push.
Right behind the “setstate <targetname> default” command you set accum 0 to 1, to correspond with a visible target_push.
Then, when the user presses the button, you still have to check wether accum 0 is 0 or 1. While you still can’t use direct If/Then commands, you can use commands that behave in a similar way, but you can only use them with accums.
The commands are for example “accum 0 abort_if_equal <value>” or “accum 0 abort_if_not_equal <value>” or “accum 0 abort_if_greater_than <value>”, etc, etc.
These commands will abort the execution thread of the code (it will stop running the current scriptblock).
The last ‘trick’ you can use might be a bit harder to understand so I’m just going to show it to you.
In the activate event of the func_invisible_user (fiu), instead of checking wether you should call the scriptblock that makes the target_push invisible or the scriptblock that makes it default, you call both scriptblocks.
Then, in those scriptblocks, you do the ‘accum 0 abort_if_equal’ check to abort one code and make the other run unobstructed.
For example:
fiu_scriptname
{
spawn
{
// set accum 0 to 0 initially, meaning that
// the push entity is DEFAULT map startanim
// set it to 1 to make it INVISIBLE at map startanim
accum 0 set 0
}
activate
{
wait 100 // little wait
// trigger both hide and show push events
trigger self hide_push
trigger self show_push
}
trigger hide_push
{
// only run code when accum 0 is 0
// meaning: push entity is default
accum 0 abort_if_not_equal 0
// add a resetscript command to prevent both events from running
resetscript
// hide entity and reset accum
setstate target_push_targetname invisible
accum 0 set 1
}
trigger show_push
{
//only run code when accum 0 is 1
//meaning: push entity is invisible
accum 0 abort_if_not_equal 1
// add a resetscript command to prevent both events from running
resetscript
// show entity and reset accum
setstate target_push_targetname default
accum 0 set 0
}
}
Now, I can’t be completely sure that this will work, it’s been a long time… but it might! And if it doesn’t have a look at the script for battery, it has exactly the same setup for things like the hatch, the door with the lever, etc etc.
Btw, the resetscript command is there to make the script return to it’s caller. If you don’t do this, both events will run at the same time and the effect is lost.
Hope it helps.
´great idea… btw… i’m a programmer as a hobby … i do it with turbo pascal… so it didnt have to be as detailed 
thanks. (i think you had a mistake… resetscript was executed too early but i didnt try it out, just wrote it at the end of the trigger).
it works… thank y very much 
In the battery script it is in the same place as in my example, although I don’t think it even matters where you put it.
I usually try to explain scripts properly because I hate it when people mindlessly copy/paste scripts without having the faintest idea how it works. Just cause you will learn so much by just trying to bring a few concepts and ideas into a script. If you always copy/paste you will never learn and you will have to keep asking how to do simple stuff even when you are mapping for a very long time already.