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 > Samples
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 03-23-2006, 02:44 PM   #16
Blade.dk
.
 
Blade.dk's Avatar


Respected User
 
Join Date: May 2005
Posts: 1,990

Submissions (15)

Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)

Approved Map: Azeroth's Arcane ArenaSpell session 01 winner

Send a message via MSN to Blade.dk
Default

Misunderstood you a bit, but anyways, that doesn't matter since it is only used to show how to use the function.
__________________
Spell Making Course: Part 1: Making a simple stomp spell.
I wonder if I'll ever finish part 2.
Blade.dk is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-22-2006, 07:57 PM   #17
vile
n00b map maker
 
Join Date: Jul 2005
Posts: 599

Submissions (5)

vile will become famous soon enough (60)vile will become famous soon enough (60)vile will become famous soon enough (60)

Send a message via ICQ to vile Send a message via AIM to vile Send a message via MSN to vile
Default

Hey. This has an annoying bug and needs to be fixed.
Collapse JASS:
    if step == 1 then
        set dec = false

This should be <= 1 instead of ==, because it is a real and it can in many cases be 1.001 or less. This caused my jumps several times to just keep moving the unit on and on..
__________________
Check out my maps:
Age of Myths
Deadly Games
Magic & Steel New Project is kicking in!

TEASER TRAILER
vile is offline   Reply With Quote
Old 04-25-2006, 04:50 AM   #18
Jazradel
Superuser
 
Jazradel's Avatar
 
Join Date: Dec 2005
Posts: 651

Submissions (1)

Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)

Send a message via AIM to Jazradel Send a message via MSN to Jazradel
Default

Ouch, thats a pretty nasty bug. Thanks.
__________________


Table:
Jump Map
Point System
Warcraft III Model Archive

W3 Model Archive should be available from https://www.mediafire.com/folder/cd5..._III_Resources, PM me if it doesn't work.

Last edited by Jazradel : 05-27-2006 at 01:40 AM.
Jazradel is offline   Reply With Quote
Old 05-26-2006, 04:35 AM   #19
Pheonix-IV
I want you inside me...
 
Pheonix-IV's Avatar
 
Join Date: Oct 2002
Posts: 4,006

Submissions (17)

Pheonix-IV is a jewel in the rough (212)Pheonix-IV is a jewel in the rough (212)Pheonix-IV is a jewel in the rough (212)Pheonix-IV is a jewel in the rough (212)

Default

I've encountered an interesting problem. I was able to transfer this spell into several maps (cheers, its perfect) but now all of a sudden if i try to put the custom script into a map, the map crashes when i try to save. Any ideas?
__________________
Pheonix-IV is offline   Reply With Quote
Old 05-27-2006, 01:39 AM   #20
Jazradel
Superuser
 
Jazradel's Avatar
 
Join Date: Dec 2005
Posts: 651

Submissions (1)

Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)

Send a message via AIM to Jazradel Send a message via MSN to Jazradel
Default

Have you created the game cache variable called cscache?
That seems the most likely cause of the crash.
__________________


Table:
Jump Map
Point System
Warcraft III Model Archive

W3 Model Archive should be available from https://www.mediafire.com/folder/cd5..._III_Resources, PM me if it doesn't work.
Jazradel is offline   Reply With Quote
Old 05-27-2006, 05:12 AM   #21
Pheonix-IV
I want you inside me...
 
Pheonix-IV's Avatar
 
Join Date: Oct 2002
Posts: 4,006

Submissions (17)

Pheonix-IV is a jewel in the rough (212)Pheonix-IV is a jewel in the rough (212)Pheonix-IV is a jewel in the rough (212)Pheonix-IV is a jewel in the rough (212)

Default

yes i have.

-EDIT-

Found problem, fixed problem.

I had some other custom script in there that was having convulsions if i put your script below it, but its fine when i put it above it. So Its all good.
__________________

Last edited by Pheonix-IV : 05-27-2006 at 05:20 AM.
Pheonix-IV is offline   Reply With Quote
Old 06-05-2006, 11:00 AM   #22
Jazradel
Superuser
 
Jazradel's Avatar
 
Join Date: Dec 2005
Posts: 651

Submissions (1)

Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)

Send a message via AIM to Jazradel Send a message via MSN to Jazradel
Default

Well thats pretty wierd. Could you post up what the other script was?
Jazradel is offline   Reply With Quote
Old 07-28-2006, 01:26 AM   #23
PandaMine
Panda > You
 
PandaMine's Avatar
 
Join Date: May 2006
Posts: 500

Submissions (4)

PandaMine has a spectacular aura about (96)PandaMine has a spectacular aura about (96)PandaMine has a spectacular aura about (96)PandaMine has a spectacular aura about (96)

Send a message via MSN to PandaMine
Default

The jump template for your map is great, especially taking into account that it doesnt need to be based off a spell like all the other templates, there is however one problem as pheonix mentioned. It is obvious when making the system you used Vexorians CSCache and then when you realesed them into your map you just copied the functions that the system uses. This however poses a problem for people who already use CSCache and copy your system into your map. I suggest that you
1) Rename the functions the game cache uses to another name so they dont conflict with Vexorians CSCache (inluding the handler function). This is the most logical solution
2) Just put all of Vexorians CSCache into the custom script section of the map and mention that other users need to copy to use your system

I am having a problem that even when i delete the game cache functions that you're jump template uses (since i have Vexorians CSCache) I am still getting a compile error and I have no idea how to fix it
PandaMine is offline   Reply With Quote
Old 07-28-2006, 12:54 PM   #24
Toadcop
BuranX
 
Toadcop's Avatar
 
Join Date: Jul 2006
Posts: 1,886

Submissions (4)

Toadcop is just really nice (299)Toadcop is just really nice (299)

Approved Map: TcXSpell Making Session 10 Winner

Send a message via ICQ to Toadcop
Default

Jazradel your sys is child like =) look at this !
WARNING ! this map was prepared to show the "Void" bug so for correct work
DISABLE this Trigger = CleanerBUGED and ENABLE RealCleaner !!! this is very important !!!
the link to the map = http://xgm.ru/forum/attachment.php?attachmentid=7603 (i don't want to flud this server =) )
Toadcop is offline   Reply With Quote
Old 07-31-2006, 09:36 AM   #25
Jazradel
Superuser
 
Jazradel's Avatar
 
Join Date: Dec 2005
Posts: 651

Submissions (1)

Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)

Send a message via AIM to Jazradel Send a message via MSN to Jazradel
Default

Yeh, your right PandaMine I should have done that a long time ago.

Is that a compliment Toadcop?

I tested your map for a long time and didn't find anything. Is it meant to duplicate the gamecache bug where stored timers return incorrectly? If it is, you might want to show it to Vex.
__________________


Table:
Jump Map
Point System
Warcraft III Model Archive

W3 Model Archive should be available from https://www.mediafire.com/folder/cd5..._III_Resources, PM me if it doesn't work.
Jazradel is offline   Reply With Quote
Old 08-01-2006, 11:24 AM   #26
Toadcop
BuranX
 
Toadcop's Avatar
 
Join Date: Jul 2006
Posts: 1,886

Submissions (4)

Toadcop is just really nice (299)Toadcop is just really nice (299)

Approved Map: TcXSpell Making Session 10 Winner

Send a message via ICQ to Toadcop
Default

Quote:
Is that a compliment Toadcop?
- i think not =) but this don't must mean what your sys is shit =) but not my level this is normal just keep learning ;) !

Quote:
If it is, you might want to show it to Vex.
- I have show it =) the meanings are different =)

PS i have finish the new version of TPC it's have ULTRA fast data reading method ! (my own use style...)
if you are interesting i can give a link or create a thread at this forum...
Toadcop is offline   Reply With Quote
Old 08-15-2006, 06:36 PM   #27
L0n3Sn1p3r
User
 
Join Date: Aug 2006
Posts: 1

L0n3Sn1p3r has little to show at this moment (0)

Default

hey can some1 explain me why my model doesn't want to make some animations while jumping??? :( :( :(
L0n3Sn1p3r is offline   Reply With Quote
Old 11-02-2006, 02:15 PM   #28
Greenspawn
User
 
Join Date: Nov 2006
Posts: 4

Greenspawn has little to show at this moment (0)

Default

question

how do you get the units to do an animation while jumping?

Last edited by Greenspawn : 11-02-2006 at 02:17 PM.
Greenspawn is offline   Reply With Quote
Old 04-01-2008, 02:38 PM   #29
sanguinax
User
 
Join Date: Dec 2006
Posts: 6

sanguinax has little to show at this moment (0)

Default

It doesn't word in my map when I save it that say lots of errors like:
function JC_H2I takes handle h returns integer i
...
I created all the variable needed of the origin map
plz help me ^^
sanguinax is offline   Reply With Quote
Old 04-11-2008, 07:36 AM   #30
Malf
I LIKE PIZZA! | >
 
Malf's Avatar
 
Join Date: Sep 2007
Posts: 625

Submissions (2)

Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)

Send a message via AIM to Malf
Default

I wanted to use a system like this, but this is very very old.

Never fear, an update is here!

Collapse JASS:
library JumpSystem

private struct data
    unit u = null
    real s = 0
    real ss = 0
    real height = 0
    real a = 0
    real dist = 0
    real angle = 0
    real b = 0
endstruct

globals
    private constant real RefreshRate = 0.035
    private timer T = CreateTimer()
    private data array Data
    private integer N = 0
endglobals

private function Update takes nothing returns nothing
    local integer i = 0
    loop
        set i = i+1
        exitwhen i > N
        call SetUnitX( Data[i].u, GetUnitX(Data[i].u) + Data[i].dist * Cos(Data[i].angle))
        call SetUnitY( Data[i].u, GetUnitY(Data[i].u) + Data[i].dist * Sin(Data[i].angle))
        call SetUnitFlyHeight( Data[i].u, Data[i].a*Data[i].s*Data[i].s+Data[i].height, 1000000 )
        if (Data[i].s <= 1) then
            set Data[i].b = 1.
        endif
        if (Data[i].b==0.) then
            set Data[i].s = (Data[i].s) - 1
        else
            set Data[i].s = (Data[i].s) + 1
        endif
        if ( Data[i].s > Data[i].ss) then
            call SetUnitFlyHeight(Data[i].u, GetUnitDefaultFlyHeight(Data[i].u), 500)
            set Data[i] = Data[N]
            call Data[N].destroy()
            set N = N - 1
        endif
    endloop
    if N == 0 then
        call PauseTimer(T)
    endif
endfunction

function JumpUnit takes unit u, location target, real height, real duration returns nothing
    local real dx
    local real dy
    local real s
    if  duration == 0 then
        call SetUnitPositionLoc(u, target)
    else
        set dx = GetLocationX(target)
        if dx > GetRectMaxX(bj_mapInitialPlayableArea) - 50 then
             set dx = GetRectMaxX(bj_mapInitialPlayableArea) - 50
        elseif dx < GetRectMinX(bj_mapInitialPlayableArea) + 50 then
             set dx = GetRectMinX(bj_mapInitialPlayableArea) + 50
        endif
        set dx = dx - GetUnitX(u)
        set dy = GetLocationY(target)
        if dy > GetRectMaxY(bj_mapInitialPlayableArea) - 50 then
             set dy = GetRectMaxY(bj_mapInitialPlayableArea) - 50
        elseif dy < GetRectMinY(bj_mapInitialPlayableArea) + 50 then
             set dy = GetRectMinY(bj_mapInitialPlayableArea) + 50
        endif
        set dy = dy - GetUnitY(u)
        set s = (duration/RefreshRate)/2
        call UnitAddAbility( u, 'Amrf' )
        call UnitRemoveAbility( u, 'Amrf' )
        if N == 0 then
            call TimerStart(T,RefreshRate, true, function Update)
        endif
        set N = N+1
        set Data[N].u = u
        set Data[N].b = 0
        set Data[N].s = s
        set Data[N].ss = s
        set Data[N].height = height
        set Data[N].a = -height/(s*s)
        set Data[N].dist = SquareRoot(dx * dx + dy * dy)/s/2
        set Data[N].angle = Atan2(dy,dx)
    endif
endfunction

endlibrary

Updated for my own use, I guess it's a good idea to post it here :p

Uses 1 timer for all actions, does not use gamecache or any attaching system at all and also uses vJass. You are no longer able to pass 'update' as an argument as the function no longer receives that argument since it's running on one timer, therefore you cannot have multiple units jumping at different intervals.

Credits to Jazradel for the original code/system, updated by yours truly. Have a nice day!
__________________

Last edited by Malf : 04-19-2008 at 03:46 AM.
Malf 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 12:07 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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