• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Need help creating a Rewind spell.

Status
Not open for further replies.
Level 6
Joined
Sep 22, 2005
Messages
166
I'm trying to create a spell based of PoP: Rewind Time. I tried it with GUI by setting a rewind region every 5 seconds, but when I cast the spell, it gets me to center of map. Can somebody help me 'cus I didn't understood Daelin's JASS Tut? But note this: Since I don't have any patch(I use game version 1.07)those who have patches won't do me any good. The spell could use nice effect of walking backwards.
 
Level 3
Joined
Oct 21, 2004
Messages
72
Copy the code you currently have for the trigger and paste it in a reply.

We can't tell you what you're doing wrong without knowing what you're doing in the first place.
 
Level 6
Joined
Sep 22, 2005
Messages
166
Variables:
RewindPos(array point)
RewindGen(integer)



Rewind Cast
Events:
A unit begins casting an ability
Conditions:
Ability being cast equal to Rewind
Actions:
Instantly move casting unit to RewindPos[RewindGen-10]

Rewind Generate
Events:
Every 5.00 seconds
Conditions:
Actions:
Set RewindPos[RewindGen]=RewindPos[RewindGen+1]
and I can't go any further

EDIT:I also could use the nice backwards walking effect during transport.
 
Level 3
Joined
Oct 21, 2004
Messages
72
Backwards walking effect is an animation, and unless a unit already has that animation, I believe you'd have to create it, or set Unit> Animation Walk to -100% or something if you can do anything like that.

Try setting the variable when the spell is cast, instead of every 5 seconds, unless that's actually what the spell is, then nevermind.

Oh, I see your problem, you're not setting either variable to the position of the hero. The default position is the center of the map (0,0) so unless you specify a point or a unit, it just keeps using that point.

I think...
 
Level 2
Joined
Jul 13, 2005
Messages
21
No not everybody has played Prince of Persia and

you will ahve to give a better picture of what you want this spell to do. Firstly does it freeze all other units or does Prince only become invincible. Second to make the Prince "walk backwards" you will need to set looping walk animation and use looping move unit instantly facing direction GUI. Something like

action:
set PrinceLoc=locationunit(prince)
set D=(distancefrom(PrinceOriginalLoc)toLocationofUnit(Prince))/20
For every integer 1-(D) do
set animation Prince(walk)
wait .1 seconds (GUI cant do less than .1, JASS can)
set PrinceNewLoc=pointwpolaroffset PrinceOriginalLoc offset distance ((D-intA)*20) offset degrees (angle between PrinceOriginalLoc and locationunit(Prince)
Move instantly to PrinceNewLoc facing (PrinceLoc)
endloop
set PrinceOriginalLoc=location of unit(prince)
customscript: Set udg_PrinceLoc=null
customscript: set udg_D=null
 
Status
Not open for further replies.
Top