etherealblade Posted November 12, 2011 Author Share Posted November 12, 2011 I'm currently trying to get the consecutive attack thing going. Still there is no dice, but this is what I got so far. Let me know if you see some things that are obviously wrong with this. It was suggested that looping animations was simpler but I'm not sure what that is. scn combinationattackscript ref TargetVar float Right int Left int LeftPower int RightPower int BackPower float timer int NButton int iFaceEachOther float fTempAngle Begin ScriptEffectStart if (iFaceEachOther > 0) if (iFaceEachOther == 5) ;skip a few frames to allow the moveto to complete. Adjust as required more or less set fTempAngle to Player.GetAngle Z + Player.GetHeadingAngle TargetVar ;these should make the player and target face each other. I think. Player.SetAngle Z fTempAngle set fTempAngle to TargetVar.GetAngle Z + TargetVar.GetHeadingAngle Player TargetVar.SetAngle Z fTempAngle set iFaceEachOther to 0 else set iFaceEachOther to iFaceEachOther + 1 return endif endif set NButton to IsKeyPressed 49 if NButton == 0 return endif If NButton == 1 Set Right to IsAnimPlaying AttackRight == 0 Set Left to IsAnimPlaying AttackLeft == 0 Set LeftPower to IsAnimPlaying AttackLeftPower == 0 Set RightPower to IsAnimPlaying AttackRightPower == 0 Set BackPower to IsAnimPlaying AttackBackPower == 0 set TargetVar to GetCombatTarget if (TargetVar == 0) ;nothing to do return endif printc "Player Target is %i %n", TargetVar, TargetVar if player.getdistance TargetVar < 200 TargetVar.GetActorCrimePlayerEnemy == 1 if timer < 2 set timer to timer + GetSecondsPassed set iFaceEachOther to 1 TargetVar.SetRestrained 1 PlayGroup AttackRight 0 If Right PlayGroup AttackLeft 0 endif If Left PlayGroup AttackRightPower 0 endif If RightPower PlayGroup AttackLeftPower 0 endif If LeftPower PlayGroup AttackBackPower 0 endif If BackPower PlayGroup Idle 1 endif endif endif endif End On Topic (Keeping Track of Current Topic Related Goals): I can get my character to do the animation, but I've been unsuccessful with making him do several animations in a row. I'm not sure how I'd handle that in script, but I've successfully been able to make him do an attack animation after a teleport and return him to user status. If script allows us to play animations consecutively, it might make for a sweet workaround for not having custom animations yet. Otherwise that's not important and can only be solved by making a custom animation. The major issue is this, how do I make it to where the script:(It currently can Auto Detect your Current Target)1) Auto scans for people in the area for eligible "warp" to targets, (I'm sure I saw a script that lets reports those who have targeted you)2) Warps you to them, (I'd make a play animation attack, It's hit them with a deadly script)3) Since it doesn't warp to targets that are dead, It'd seek the next available target.3) Then returns you where you were. Link to comment Share on other sites More sharing options...
Recommended Posts