Best way to achieve a smooth health bar
bjandthekatz
Orlando, FlMember Posts: 1,375
I am looking for a line to represent the time, and initially take up the entire top of the screen (412px). When time is subtracted/added I would like the bar to be constrained to the current time available. From the tutorials I've watched and the experiments I've done, I can only get a choppy result.
What is the best way to do this for a smooth viewing experience?
Need Help? Email Me | Templates | Full Game Source Code
Comments
By time do you mean the actual time?
Or is it a timer keeping track of something in-game?
If you constrain something to something, that something is always keeping track of a change in that other something, so it may look choppy.
Try to interpolate the value of the current bar to the new value, over a period of time (1 second, for example).
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
How's this?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
That works perfect @tatiang . Thank you
Need Help? Email Me | Templates | Full Game Source Code
You're welcome. I replaced the file above with a slightly simpler version with notes in the actor.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang wow gonna try tomorrow if this works for orcs healtbars would be smooth
thanks!!
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
@BigDave You're welcome! Hope it works in a real situation with other actors, constraints, etc.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Threads like this make me sad that all my demos are forced into one thread where only a tiny fraction of people see new ones that are posted
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Its for the good of the forum, otherwise this forum would turn into an advertising forum and give the green light for spamming with template posts.
Fortuna Infortuna Forti Una
I still disagree, but will stick to my thread. Certainly not delving into that hornet's nest again! I definitely post about 1/3 of what I would otherwise, though, and what I do post gets seen by 1/100th the people it otherwise would. Ah well, the price you pay for some people's insistence on abusing the system!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support