Shaidon7 Posted February 28, 2010 Share Posted February 28, 2010 I'm trying to make a fireworks effect to work properly in my Mod, but I can't make the SetPos work properly! I made a weapon with a bunch of functions, one setup the poor target to be a fireworks. Everything is working fine, except that I can't update the boom trigger to his exactly position. I know that is possible cause using only MoveTo, I can make the explosion happens in the sky, but since some Actors fly highter then others (guess it because of weight), the explosion with Z axis set won't be nice. Here is the script. Actor Effect set to 2s. scn iCheatFireworksScript ref iCmyself float iCposX float iCposY float iCposZ Begin ScriptEffectStart set iCmyself to GetSelf set iCposX to iCmyself.GetPos X set iCposY to iCmyself.GetPos Y set iCposZ to iCmyself.GetPos Z iCheatContainerREF.PushActorAway iCmyself 50 CIOS SpellFlamerEffect iCheatContainerREF.MoveTo iCmyself 0 0 500 End Begin ScriptEffectUpdate iCheatContainerREF.SetPos X iCposX iCheatContainerREF.SetPos Y iCposY iCheatContainerREF.SetPos Z iCposZ End Begin ScriptEffectFinish iCheatContainerREF.PlaceAtMe GrenadeNukaFireBurst KillActor Player 0 0 CIOS SpellFlamerEffect End The container was already set before the script start, so the target always goes up like I want. I used a Misc Object as the boom trigger, and got the same results. If you take the ScriptEffectUpdate you will see that the explosion will happens in the air. For lighter targets, is close to 1300 Z axis. For a armored goes almost double of high, making the explosion happens in the middle. Well, if I can't manage that to work, than I will make like 3 different explosions with a set Z axis. But won't work nice if the target find a obstacle. Link to comment Share on other sites More sharing options...
Shaidon7 Posted March 2, 2010 Author Share Posted March 2, 2010 I almost got it with a variable for Z using a multiplier with target Endurance, but still not perfect! :pinch: If someone could at least show me the equation used by the game to calculate gravity on Z with the PushActorAway function... Link to comment Share on other sites More sharing options...
Recommended Posts