How to set a height limitation? SOLVED

  • Thread starter Thread starter Eternal-Krauser
  • Start date Start date
E

Eternal-Krauser

Guest
Hello friends, I need to set a height limitation on a stage in my mod, if you hit an enemy with an uppercut, he must fly to the ceiling and stop there (without passing through ), is there some method to do this?
 
height {alt}

~Affects an entity's ability to walk under platforms.
~If the platform is higher off the ground than this entity's height, this entity can move under it. Otherwise, it will get pushed out. However if somehow entity get stuck under platforms which are shorter, entity can only change direction and slide (see Animation Types below).
~{alt} is measured from the offset point up.
~This setting applies to all animation. If you want certain animations to have different heights use 'animheight' (see Animation Data).

animheight {alt}

~This command sets entity's height just for this animation. It overrides 'height' (see Header Data above) if it's declared.
~Defaults to 0 or 'height' if it's not declared.
 
sorry friends I really don't get it, must I set a platform (platform entity) where is the ceiling?? I've try it but nothing works fine, and this explanation "height {alt} ~Affects an..." has no sense to me right now, can someone explain me a little easy?
anyone remember if there is a mod that has this limitation on the roof that I can copy?
a method simple like the wall setting, but for a ceiling command it would be great!!
 
Have you ever made a platform before?
If you haven't try this for ceiling:

name Ceiling
type none
offscreenkill 3000
facing 1
subject_to_gravity 0


anim idle
    delay 100
    offset 1 1
    platform 1 1 -5000 -5000 5000 5000 1000 10
    frame data/chars/misc/empty.gif

This platform is very wide 5000 pixels to left and right and 1000 pixels back (in z axis) but it's slim (10 pixel high).
I don't know how high you want ceiling be but you can try placing this ceiling at least 240 high above ground.

Since this ceiling is invincible, you can't see it. The only way to know it's there is by setting height as suggested above and jump to ceiling to hit your head ;)
 
Sorry Bloodbane it doesn't work or I still dont get it.
1-to make the platform like you say (no problem here, I've made many platforms, but never for ceiling)

name      Ceiling
type      none
offscreenkill  3000
facing      1
subject_to_gravity 0


anim idle
    delay    100
    offset    1 1
    platform    1 1 -5000 -5000 5000 5000 1000 10
    frame    data/chars/misc/empty.gif

2-set the platform on the current stage I assume, in this stage (1000 p X 244 p) the ceiling must be on pixel 35 (from top to bottom) in the level text I set this limitations

stage 4-2
z      130 198 160
file data/levels/st42.txt

but I dont know where set it (maybe on the floor or where the graphic ceiling ist?? pixel 35 from top to bottom)

3-I assume that de hight command must be placed in the chars is it ok ?
like I said before I dont understand this legend

"height {alt}

~Affects an entity's ability to walk under platforms.
~If the platform is higher off the ground than this entity's height, this entity can move under it. Otherwise, it will get pushed out. However if somehow entity get stuck under platforms which are shorter, entity can only change direction and slide (see Animation Types below).
~{alt} is measured from the offset point up.
~This setting applies to all animation. If you want certain animations to have different heights use 'animheight' (see Animation Data)."

this text rather than a solution, it raises many questions....
 
I think you may need to make a platform, can be 2D or 3D plane, for making a ceiling. Also, you could add an attack box to it. If you want the characters to be stuck/dead on the ceiling with spikes, you may need to use platform and attackbox.

  stage      4-2
  z          130 198 160
  file    data/levels/st42.txt

Like Bloodbane, platform would work. You may want to set your ceiling platform like this I think:

Code:
name      Ceiling
type      none
offscreenkill   3000
facing      1
subject_to_gravity 0

anim idle
   loop 1
   offset 1 1
   delay 100 
   attack 0 0 5000 68 100 0 0 0 0 1
   platform 1 1 0 0 1000 1000 35 10
   frame data/chars/misc/empty.gif

In a stage.txt you have there (not levels.txt), in st42.txt, for example, you need to move that Ceiling entity up from the ground/z panel you are standing on. Change the third parameter of coords for making it move up from the ground. The Ceiling entity starts with spawning from 0 in coords which is on the floor. To avoid letting it being on the floor, like I said, you need to move it up from the ground by incrementing the y value of coords. (coords x z y)

spawn Ceiling
coords 0 160 240 #Increasing number for platform to move up from the ground . Starting with 0 normally in default will spawn on the ground. Increasing to 240 in the 3rd par means it spawns from the sky like it's floating. It's already up there away from the floor.
at 0
 
Krauser, has you added that ceiling on your level yet?

It should be spawned like this:

spawn Ceiling
coords 0 198 240
at 0

Maxman, there's no need for attackbox cause height is enough to block player from jumping through this ceiling.

I assume that de hight command must be placed in the chars is it ok ?

Yes
If you have played platformers, you should notice that characters can't walk through short tunnels unless they slide or crouch. That's what height is for. animheight usually set in slide or crouch animation with lower value than height

Why don't you spawn that ceiling and set height first then try hitting your head to ceiling? :)
 
IT WORKS !!!!

I set this

spawn  Ceiling
coords  0 198 150
at      0
with this value "150"

In my chars I set this:

height 100

now works perfects, this opens new possibilities of stage designing to me!!

thanks a lot Bloodbane !!!! and thanks a lot to O Ilusionista and maxman for helping me, I hope this can be useful for others modders too.

 
Maxman, there's no need for attackbox cause height is enough to block player from jumping through this ceiling.
LOL Bloodbane, I thought he was trying to make a spiky ceiling for having chars dead or being stuck up there (MK and Jennifer style for pitfall fatalities) and that's why I mentioned attackbox. I see your point in not needing an attackbox. You are right about it though I haven't tried making a platform blocking from jumping.

Looks like it's all good now. ;D Problem solved.
 
Back
Top Bottom