YesNoOk
avatar

How to bind a helper to the screen (Read 449 times)

Started by Borghi, August 16, 2013, 08:08:51 pm
Share this topic:
How to bind a helper to the screen
#1  August 16, 2013, 08:08:51 pm
  • ****
  • Happy release for you all!
    • Argentina
    • www.andresborghi.com.ar
Hi!
is there a way to make a helper to look similar to the lifebars by binding it to the screen?
I haven't found a way yet, since "posset y" uses the floor of the stage as reference and that way I can't keep it in the place I want regardless of which stage is behind.
      
Little John from the big castle, plays with little friend,
snip! snip! snip! off goes his head, bright red! bright red!
Re: How to bind a helper to the screen
#2  August 16, 2013, 08:13:04 pm
  • ****
  • [MUFFLED ROCK MUSIC PLAYING IN THE DISTANCE]
    • Chile
    • koakoa@jabber.org
I found a way once by using "y = pos y - screenpos y + <displacement>" in a posset. It's the best we can get it to work, it jitters a bit, but it gets the job done
Re: How to bind a helper to the screen
#3  August 16, 2013, 08:14:07 pm
  • ****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • pv2matos@gmail.com
RedNavi wrote an article explaning this,  I lost the bookmark when my HD crashed but I found it when I googled his game KOF NEST CONCLUSION
Re: How to bind a helper to the screen
#4  August 16, 2013, 09:14:47 pm
  • ****
  • Happy release for you all!
    • Argentina
    • www.andresborghi.com.ar
I found a way once by using "y = pos y - screenpos y + <displacement>" in a posset. It's the best we can get it to work, it jitters a bit, but it gets the job done

I'll try this! thanks.

RedNavi wrote an article explaning this,  I lost the bookmark when my HD crashed but I found it when I googled his game KOF NEST CONCLUSION

I guess this is it:
http://mugenguild.com/forum/topics/kof-nests-conclusion-100279.0.html

Do you have any idea in which part is it mentioned?
      
Little John from the big castle, plays with little friend,
snip! snip! snip! off goes his head, bright red! bright red!
Re: How to bind a helper to the screen
#5  August 16, 2013, 09:35:01 pm
  • ****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • pv2matos@gmail.com


No thats not it, it wasnt on this website.
He wrote about how he created his game, his custom tag system and how he coded his lifebars as helpers.
Another member here mentioned it not to long ago, i cant even find the article.
Should probally ask RedNavi about it.
Re: How to bind a helper to the screen
#6  August 20, 2013, 06:06:57 am
  • ****
  • Accomplished many things you can't comprehend.
    • USA
    • http://clubsyn-x-treme.com
[state 0, posset]
type = posset
trigger1 = 1
x = (screenpos x) + 160 ;<--- adjust the values to your likings. negative values works also
y = (screenpos y) + 120 ;<--- adjust the values to your likings. negative values works also
ignorehitpause = 1

or in an explod

[state 0, explod]
type = explod
trigger1 = 1 && !numexplod(whatever)
anim = whatever
id = whatever
postype = left
pos = 160,120
bindtime = -1
ignorehitpause = 1
Last Edit: August 20, 2013, 06:10:31 am by -SyN-
Re: How to bind a helper to the screen
#7  August 20, 2013, 06:11:05 am
  • ****
  • Happy release for you all!
    • Argentina
    • www.andresborghi.com.ar
[state 0, posset]
type = posset
trigger1 = 1
x = (screenpos x) + 160 ;<--- adjust the values to your likings. negative values works also
y = (screenpos y) + 120 ;<--- adjust the values to your likings. negative values works also
ignorehitpause = 1

that's what i ended up doing. thanks!
The only thing I didn't manage to do was to make it appear over the stage sprites with high sprpriority. Te limit of sprpriority on helpers seems to be 5 and it doesn't work for that. psss!
      
Little John from the big castle, plays with little friend,
snip! snip! snip! off goes his head, bright red! bright red!
Re: How to bind a helper to the screen
#8  August 20, 2013, 06:13:07 am
  • ****
  • Accomplished many things you can't comprehend.
    • USA
    • http://clubsyn-x-treme.com
only explods will overlap stage sprites using ontop = 1 and there is really no limit to the sprpriority values. its just listed as 5 through -5.
Re: How to bind a helper to the screen
#9  August 20, 2013, 06:15:14 am
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
This is just a thought, but wouldn't using X = 0 mean always centered on the stage? Or Does it differ depending on the screen size, which is the reason for screenpos X?

"You must defeat my flaming
dragon punch to stand a chance."
Re: How to bind a helper to the screen
#10  August 20, 2013, 06:21:43 am
  • ****
  • Accomplished many things you can't comprehend.
    • USA
    • http://clubsyn-x-treme.com
to a certain extent, yeah. but screenpos binds helpers to a position better IMO.

But I prefer 1.1's CameraPos over ScreenPos.
Re: How to bind a helper to the screen
#11  August 20, 2013, 07:16:53 am
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
So what would happen if you just used screenpos X alone? What's the +160 serve for the X position adjustment? Would ScreenPos X alone just bind them to the far left or far right of the screen, while + 160 puts them at the center starting from the far left/right?

"You must defeat my flaming
dragon punch to stand a chance."