I have a crossbow which shoots bolts. I want to pick up the bolts, that I shot.
For now I have added a Script to the "Impact Script" for the Ammo "Bolt".
When I hit an enemy, the pickable bolt is created under the enemy. Thats ok for me.
But I want to disable and markfordelete the bolt, if I can't pick it up for some reaon (can't find it or whatever). For clean scripting und to prevent savegame bloat.
So I want the script to wait maybe 10 seconds before setting disable and markfordelete, so I can pick up the shot bolt in this time (10 sec).
My Script so far:
scn 213ArmbrustPlaceAtMe001ref BoltTemp21short BoltShotfloat BoltTimerBegin ScriptEffectStart set BoltTemp21 to PlaceAtMe 01Abolt 1 1 0 set BoltShot to 1 set BoltTimer to 10EndBegin GameModeif BoltTimer > 0 set BoltTimer to BoltTimer - getSecondsPassed else if BoltShot == 1 BoltTemp21.disable BoltTemp21.markfordelete set BoltShot to 0 endifendifEnd
The Bolt is "placed-at-me" under the enemy but won't be disabled after 10 seconds.
Where is my mistake?
Do I need a "Quest-Script" for this? The above script is only an "Effect-Script" for the Impact of the Ammo.
Greetings