Andyno Posted August 16, 2017 Share Posted August 16, 2017 As you can see in the script, the vertibird will drop 3 bombs as it flies by. The problem is that vertibird starts to drop them at random time, and that's what I don't want - I need to achieve that vertibird will start dropping bombs always at the same time. Is something like this possible? I suppose it would be sufficient to change some values/numbers in the script, but since I'm a script noob, I'm asking for help here... scn DCWallVertibirdStrafe02SCRIPT ; This trigger enables it's linked ref (a vertibird) and calls its forward animation ; It also tells the vertibird when to fire its weapon ; This script is the same as strafe01script, but it drops more bombs float timer float fireTimer short doOnce short firingFlag ;0 - not firing 1 - waiting to fire 2 - firing vertibirdgun 3 - firing fatman ref linkedRef ;***************************************** Begin gameMode if linkedRef == 0 set linkedRef to getLinkedRef endif if (doOnce == 1) if (timer <= 0) linkedRef.playgroup Forward 1 set fireTimer to 1 set firingFlag to 1 set timer to 2.5 ;timer now becomes the master timer for the firing block set doOnce to 2 else set timer to timer - GetSecondsPassed endif elseif (doOnce == 2) if (linkedRef.isAnimPlaying Forward == 0) linkedRef.disable ;disable the vertibird when it's done playing its forward animation set doOnce to 3 endif if (timer <=0) set firingFlag to 0 else if (firingFlag == 1) if (fireTimer <=0) linkedRef.fireWeapon vertibirdBombgun set fireTimer to .5 set firingFlag to 2 else set fireTimer to (fireTimer - GetSecondsPassed) endif elseif (firingFlag == 2) if (fireTimer <=0) linkedRef.fireWeapon vertibirdBombgun set fireTimer to .5 set firingFlag to 1 else set fireTimer to (fireTimer - GetSecondsPassed) endif endif set timer to (timer - GetSecondsPassed) endif endif End ;***************************************** Begin onTriggerEnter Player if (doOnce == 0) && (getStage MQ05 >= 85) linkedRef.enable 0 set timer to 5 set doOnce to 1 endif End Link to comment Share on other sites More sharing options...
Mktavish Posted August 18, 2017 Share Posted August 18, 2017 As you can see in the script, the vertibird will drop 3 bombs as it flies by. Where are you seeing this ? Link to comment Share on other sites More sharing options...
Andyno Posted August 19, 2017 Author Share Posted August 19, 2017 It's not clearly visible in the script? Actually, I don't know, because I'm script noob. I just saw that in action in game. Link to comment Share on other sites More sharing options...
Mktavish Posted August 19, 2017 Share Posted August 19, 2017 Ya I'm only seeing 2 of these "linkedRef.fireWeapon vertibirdBombgun" Whicht I assume are the commands to do that ? ... but it seems it may loop back in on itself ^shrug^ My eyes kinda glaze over with scripts like that still (*)(*) Link to comment Share on other sites More sharing options...
vforvic Posted August 20, 2017 Share Posted August 20, 2017 Are you trying to run the scripted attack sequence different times in different places or just the same Vertibird doing multiple runs? How are you using the script exactly in the mod? Link to comment Share on other sites More sharing options...
Andyno Posted August 20, 2017 Author Share Posted August 20, 2017 (edited) Welcome to the thread! :smile: I suppose it's the 2nd option, except the fact that I don't know what you mean by "multiple runs". Perhaps you think that vertibird will drop 1st set of bombs, then it returns, and drop 2nd set of bombs...? I'm using the script exactly as it is used in vanilla game (cell DCworld12) - the trigger is simply linked to vertibird via Linked Ref tab. On the picture you can see my scene: player goes through the trigger, and after few seconds vertibird will appear, and starts to drop bombs along the way. The problem is that it sometimes hit the wall on the left, and that's what I don't want. Edited August 20, 2017 by Andyno Link to comment Share on other sites More sharing options...
vforvic Posted August 21, 2017 Share Posted August 21, 2017 I use that script setup in my mod Merc2 and it seems to be pretty accurate on every drop I tested. Mine is not triggered by a player trigger, but a script variable being set at a certain point. If you want me to look at and test your setup I can PM you my email address or you can upload it somewhere else for me to download. It might be a matter of changing how the script is triggered. Link to comment Share on other sites More sharing options...
Andyno Posted August 22, 2017 Author Share Posted August 22, 2017 PM sent... Link to comment Share on other sites More sharing options...
Recommended Posts