wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Spells
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 04-17-2007, 06:21 AM   #16
moonliterhythm
User
 
Join Date: Mar 2006
Posts: 71

moonliterhythm has little to show at this moment (8)

Default

ok i definitely got it working now:

added k as parameters to both ItemCheck and GuessBounce function

in the ValidImpact function added:

call SetTableBoolean(k, "Fkey", true)

in the ItemCheck function added:


if (GetTableBoolean(k, "Fkey) == true) then
SetTableBoolean(k, "Fkey", false)
return false
endif










these mods ensure that the rock bounces off units
moonliterhythm is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-22-2007, 11:39 PM   #17
waaaks
User
 
waaaks's Avatar
 
Join Date: Apr 2007
Posts: 356

waaaks is on a distinguished road (12)

Default

Vexorian the best
waaaks is offline   Reply With Quote
Old 06-25-2007, 08:53 PM   #18
ClichesAreSt00pid
User
 
Join Date: Jan 2007
Posts: 157

ClichesAreSt00pid has little to show at this moment (4)

Default

In the func "RollingBoulder_BoulderMov" it uses the same character "k" twice, is that meant to be for some reason?
ClichesAreSt00pid is offline   Reply With Quote
Old 06-26-2007, 03:17 AM   #19
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Elaborating is probably a good idea, but it is most likely a typo.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 07-04-2007, 03:38 PM   #20
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

Sorry to say I've kind of made this spell's methods obsolete when pyrogasm asked me to make a bouncing shockwave... I went overboard and found some nice methods that could improve this spell's performance and behavior. (without turning WC3 into a physics simulation)... then again you probably hate this spell by now.

example: find the terrain normal of the ground and negate its Z value in order to find the direction to bounce the object off of cliffs.

Last edited by grim001 : 07-04-2007 at 03:46 PM.
grim001 is offline   Reply With Quote
Old 07-04-2007, 06:53 PM   #21
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

terrain normal = GetLocationZ = possible only on a limited set of maps.

Not sure if that really improves performance, seems to be something that would improve accuracy.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 07-04-2007, 11:26 PM   #22
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

Quote:
Originally Posted by Vexorian
terrain normal = GetLocationZ = possible only on a limited set of maps.

What would prevent it from being used? Works fine on any map that uses standard cliffs, otherwise the terrain will be pathable unless they put a pathability blocker down, and that counts as bouncing off a destructable.

Basically I look for collision with a unit...
if there's none I look for collision with a destructable...
if there's none I check whether the terrain is pathable using SetUnitPosition on a dummy unit...

if the terrain is unpathable and it hasn't run into something, it compares the Z height at the object's position to the Z height in front of it... if it's going downhill it ignores the terrain and allows it to drop down the cliff. otherwise, it finds the X and Y components only of the terrain normal. (a vector pointing straight from the wall to the unit, how convenient)

So there are 3 types of collisions here: with a unit, a destructable, and with terrain. In any case it's got a vector between the object and what it collideded with, which is enough to do as the picture demonstrates...

As for performance, it's just the way it's coded, I don't like to use non-native function calls in fast periodic functions, not to mention it eats memory since you create and destroy handles in your pathing check.

Last edited by grim001 : 09-15-2007 at 02:52 AM.
grim001 is offline   Reply With Quote
Old 07-04-2007, 11:33 PM   #23
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Quote:
What would prevent it from being used? Works fine on any map that uses standard cliffs.

GetLocationZ desyncs on any map that uses spells such as shockwave or thunderclap that have local terrain deforms.

Quote:
As for performance, it's just the way it's coded, I don't like to use non-native function calls in fast periodic functions, not to mention it eats memory since you create and destroy handles in your pathing check.
But that's totally unrelated to the algorithm, but related to implementation.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 07-04-2007, 11:40 PM   #24
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

Both true, but I think terrain deformations are dumb anyway. Guess it needs a warning lable.
grim001 is offline   Reply With Quote
Old 07-05-2007, 05:23 PM   #25
Toadcop
BuranX
 
Toadcop's Avatar
 
Join Date: Jul 2006
Posts: 1,887

Submissions (4)

Toadcop is just really nice (295)Toadcop is just really nice (295)

Approved Map: TcXSpell Making Session 10 Winner

Send a message via ICQ to Toadcop
Default

Quote:
but I think terrain deformations are dumb anyway
+1 100% cause they are extreme laggy on normal terrains (+ some doodads destructibles) and yes this stupid shit with possible DeSyncs... i would say ban terrain deforms out of wc3 xD
Toadcop is offline   Reply With Quote
Old 07-30-2007, 06:29 PM   #26
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

This was already reported
Code:
function RollingBoulder_BoulderMov takes string k, unit m,integer l, timer t,group g,string k returns boolean

two same k variables.

It prevents me from compiling the map.

I think CS_Cashe 13.3 is incompatible with NewGen v3d
(probably because system is directly in map header)

When you get the time please update the spell,
I want to use it for my earth pandaren hero ...

PS: I think that this compiling problem disqualifies this spell as a JESP.
cohadar is offline   Reply With Quote
Old 07-30-2007, 09:37 PM   #27
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Quote:
PS: I think that this compiling problem disqualifies this spell as a JESP.
It doesn't.

Quote:
I think CS_Cashe 13.3 is incompatible with NewGen v3d
Yes, it is, but it compiles (provided you got the stupid GUI variables), the compile error is with RollingBoulder...
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 07-30-2007, 11:13 PM   #28
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

Well to me not easy to implement == not JESP

Anyways I got bored and fixed the map.
That last parameter was definitely a typo, removed it completely.
Also updated the systems to 14.3 so it compiles with NewGen now.
Also took the liberty of renaming the map to rollingboulder_u4
I don't want any credit, it was just a stupid copy-paste job.

one note:
Code:
            if (dx*dx+dy*dy>400) then
                call SetUnitPosition(m,nx,ny)
            endif
unnamed constants in code, shame on you.
cohadar is offline   Reply With Quote
Old 07-31-2007, 12:20 AM   #29
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

It was easy to implement as long as you don't have newgen. And JESP is an standard mainly multi instanceable templates, nothing to do with easy to implement.

Changing that 400 to anything else would be lame.

And please, don't ever release modified versions of my spells like that, it would cause confusion.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 07-31-2007, 09:03 AM   #30
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

I must disagree with you about that 400,
you could at least put a comment like
// if distance between is grater than 20 blah blah...
I personally would put a named constant there no matter how lame it sounds
MIN_COLLISION_DIST (definitelly lame )

It was just an example but your code here is full of constants without explanation.
Thanks got you remembered to put those degrees constants comments.
(and you probably put them so you wouldn't forget what it is all about)

Also I don't like the fact that only comments in code are about changing
spell parameters, there is not a single line about how spell works,
for example: "when boulder gets to a wall here is how we bounce it... blah blah"

To sum it: it would probably take me equal time to write this spell from scratch, as to figure out how is it working now,
and it would definitely be more fun.
Therefore for spell idea I give you 10, and for spell coding 5.

PS: we all know you are great JASSer but no one is great beyond improvement.
cohadar is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 11:02 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services