Lol at me! (need help)

The perfect one step solution for creating Ice/Sliding Mazes in both Reign of Chaos and The Frozen Throne. It is the only decent system around and it even works in RoC, is lagfree, perfectly optimized, fast and reliable. The included TerrainKill feature frees you from the tedious task of creating a thousand kill-regions.

Lol at me! (need help)

New postby manstie on Tue Aug 18, 2009 8:55 am

Okay, so I tried to do something sexy with my jumpers.
What I wanted to happen is:
When someone jumps while on ice, they will slide while in the air.
When someone jumps while on normal, they wont slide while in the air.
Here's what I've got:

On my jumper, I did set
Code: Select all
udg_LastTerrain[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetTerrainType(x,y)

Then I added to your sliding system:
Code: Select all
    if(GetUnitFlyHeight(u)<1)then
        local integer t=GetTerrainType(x,y)
        if(t==udg_Slide)or(t==udg_Slide2)or(t==udg_Slide4)then
            call SetUnitX(u,x+udg_Speed[GetConvertedPlayerId(GetOwningPlayer(u))]*Cos(0.017453278*GetUnitFacing(u)))
            call SetUnitY(u,y+udg_Speed[GetConvertedPlayerId(GetOwningPlayer(u))]*Sin(0.017453278*GetUnitFacing(u)))

//Delete this line for the cool Realistic Sliding Mode (Between START1 and END1)
//START1
            call IssueImmediateOrder(u,"stop")
//END1

//Delete these two lines to remove terrainkill (Between START2 and END2)
//START2
        elseif(t==udg_TerrainKill)and(GetUnitState(u,UNIT_STATE_LIFE)>0)and(GetUnitFlyHeight(u)<1)then
            call KillUnit(u)
//END2

        endif
        if(t==udg_Slide3)then
        call SetUnitX(u,x+udg_Speed2[GetConvertedPlayerId(GetOwningPlayer(u))]*Cos(0.017453278*GetUnitFacing(u)))
        call SetUnitY(u,y+udg_Speed2[GetConvertedPlayerId(GetOwningPlayer(u))]*Sin(0.017453278*GetUnitFacing(u)))

//Delete this line for the cool Realistic Sliding Mode (Between START1 and END1)
//START1
        call IssueImmediateOrder(u,"stop")
//END1

//Delete these two lines to remove terrainkill (Between START2 and END2)
//START2
        elseif(t==udg_TerrainKill)and(GetUnitState(u,UNIT_STATE_LIFE)>0)and(GetUnitFlyHeight(u)<1)then
            call KillUnit(u)
//END2

        endif
    elseif(udg_LastTerrain[GetConvertedPlayerId(GetOwningPlayer(u))]==udg_Slide)or(udg_LastTerrain[GetConvertedPlayerId(GetOwningPlayer(u))]==udg_Slide3)or(udg_LastTerrain[GetConvertedPlayerId(GetOwningPlayer(u))]==udg_Slide4)then
        call SetUnitX(u,x+udg_Speed[GetConvertedPlayerId(GetOwningPlayer(u))]*Cos(0.017453278*GetUnitFacing(u)))
        call SetUnitY(u,y+udg_Speed[GetConvertedPlayerId(GetOwningPlayer(u))]*Sin(0.017453278*GetUnitFacing(u)))

//Delete this line for the cool Realistic Sliding Mode (Between START1 and END1)
//START1
        call IssueImmediateOrder(u,"stop")
//END1

    elseif(udg_LastTerrain[GetConvertedPlayerId(GetOwningPlayer(u))]==udg_Slide2)then
        call SetUnitX(u,x+udg_Speed2[GetConvertedPlayerId(GetOwningPlayer(u))]*Cos(0.017453278*GetUnitFacing(u)))
        call SetUnitY(u,y+udg_Speed2[GetConvertedPlayerId(GetOwningPlayer(u))]*Sin(0.017453278*GetUnitFacing(u)))
    endif

Basically, I failed miserably.
Any ideas? (3ICE has probably got heaps! :lol: )
I'm pretty sure its all of those "elseif"'s... so if I can't do that, then how will I do what I was intending to do?
___________________________________________________________________________________________

Fixed it. Took me a whole though. - Holy shit! It actually works!
Image
User avatar
manstie
 
Posts: 273
Joined: Wed Jun 17, 2009 9:27 am
Location: Perth, Australia
Account: manstie

Re: Lol at me! (need help)

New postby 3ICE on Tue Aug 18, 2009 11:39 am

What you tried to achieve is the default behavior of my system. You broke it by making that edit.

manstieWhen someone jumps while on ice, they will slide while in the air.
By default, units will slide on ice.
manstieWhen someone jumps while on normal, they wont slide while in the air.
By default, units will not slide on ground.

This is what my system does with jumpers/fly heights:
  • Ignore
  • Discard
  • Do not care
Just because the units do not touch the ground, doesn't mean they are not on it.

manstieWhen someone jumps while on ice, they will slide while in the air.
By default, flying units will slide above ice.
manstieWhen someone jumps while on normal, they wont slide while in the air.
By default, flying units will not slide above normal ground.

EDIT: If you want units to continue sliding above ground if they jumped from ice, you should have said so.
ImageImageImageImageImage
Image
ImageImage
User avatar
3ICE
Admin
 
Posts: 2118
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE

Re: Lol at me! (need help)

New postby manstie on Sun Aug 23, 2009 5:43 am

I find what I did is a really cool addition to your sliding system. I was planning to make "3ICE Sliding System Ultimate Jumpers Add on".
Image
User avatar
manstie
 
Posts: 273
Joined: Wed Jun 17, 2009 9:27 am
Location: Perth, Australia
Account: manstie

Re: Lol at me! (need help)

New postby 3ICE on Sun Aug 23, 2009 6:53 am

You can use my system however you want, but please don't release unofficial modifications.

Feel free to write a tutorial on how to add boosters though.
ImageImageImageImageImage
Image
ImageImage
User avatar
3ICE
Admin
 
Posts: 2118
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE

Re: Lol at me! (need help)

New postby manstie on Sun Aug 23, 2009 7:17 am

Come on...
Image
User avatar
manstie
 
Posts: 273
Joined: Wed Jun 17, 2009 9:27 am
Location: Perth, Australia
Account: manstie


Return to 3ICE's Sliding System for RoC



Who is online

Users browsing this forum: No registered users and 1 guest

cron