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.
User avatar
manstie
Posts: 310
Joined: Wed Jun 17, 2009 9:27 am
Account: manstie
Location: Perth, Australia
Contact:

Lol at me! (need help)

Unread post by manstie »

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
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Lol at me! (need help)

Unread post by 3ICE »

What you tried to achieve is the default behavior of my system. You broke it by making that edit.
manstie wrote:When someone jumps while on ice, they will slide while in the air.
By default, units will slide on ice.
manstie wrote:When 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.
manstie wrote:When someone jumps while on ice, they will slide while in the air.
By default, flying units will slide above ice.
manstie wrote:When 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
manstie
Posts: 310
Joined: Wed Jun 17, 2009 9:27 am
Account: manstie
Location: Perth, Australia
Contact:

Re: Lol at me! (need help)

Unread post by manstie »

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
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Lol at me! (need help)

Unread post by 3ICE »

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
manstie
Posts: 310
Joined: Wed Jun 17, 2009 9:27 am
Account: manstie
Location: Perth, Australia
Contact:

Re: Lol at me! (need help)

Unread post by manstie »

Come on...
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests