playMaker

Author Topic: Need help with setting up a GUI Combat Text/String Format's  (Read 2712 times)

Kaneydien

  • Playmaker Newbie
  • *
  • Posts: 15
Need help with setting up a GUI Combat Text/String Format's
« on: April 13, 2013, 03:13:19 PM »
Hi everyone, as the title reads I am trying to set up a basic Gui Combat Text Log. I want it to record things like when my player does damage, receives damage, misses, hits, etc. I want the combat log not to fade out, but to stay until I send an event to erase the strings in it, and allow new strings to be added. I have not found any good tutorials dealing with Guis/Strings/Formats that sort of thing with Playmaker. If anyone can point me in the right direction, I would appreciate it. Thanks!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Need help with setting up a GUI Combat Text/String Format's
« Reply #1 on: April 13, 2013, 07:02:33 PM »
Sounds like a job for Format String:

Kaneydien

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Need help with setting up a GUI Combat Text/String Format's
« Reply #2 on: April 14, 2013, 12:40:01 PM »
Yes, thank you this helps. I have actually been working on those tutorials I just was not that far yet.
However, I guess the real problem I am having is working out the logic of the combat log itself. I want the information to be kept in the log until I want it deleted.
Example:
You attack and deal X damage
Enemy Attacks and deals X damage.
You attack and miss
Enemy Attacks and misses
....and so on

I'm not really sure what GUI component it would take to do this, or how the logic would be set up. Any suggestions?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Need help with setting up a GUI Combat Text/String Format's
« Reply #3 on: April 15, 2013, 01:44:21 AM »
Hi,

 you could maintain the log in an array, using ArrayMaker, that woul dbe your first step towards maintaining an history of actions.

https://hutonggames.fogbugz.com/default.asp?W715

so you define a maximum number of items to show, and when you add a new item in the array, you simply delete the last one in that array, ( first in, last out)

the array is filled with empty string at start so that it's easier to manage the initial logs ( when only 1 or 3 actions are here)

 as far as the gui, then you can maintain a state showing  them 4,5 actions, and either have one gui label for each, or compose them using stringbuild action and put a return delimiter in between each of them.

Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Need help with setting up a GUI Combat Text/String Format's
« Reply #4 on: April 15, 2013, 01:45:08 AM »
Hi.
 actually, if you study the inventory example shipped with arrayMaker, there is a similar gui listing for inventory in your bag. so you can inspire from that actually,

bye,

 Jean