Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Bugs & Feature requests / Re: Methods from OLB resources not working?
« Last post by gmanplays@gmail.com on February 11, 2019, 09:18:10 pm »
Oh jesus, you can search for specific terms on Github? God, I wish I was more observant. Thanks much my guy.
22
Development / Re: combos...again
« Last post by alexgleason on February 11, 2019, 08:53:22 pm »
I'd probably create an "attack queue" on the hero.

It's a history of recent attacks, stored as a Lua table.

When you press "attack":
1. The game reviews the current attack queue,
2. determines what the attack action will be based on that queue,
3. then performs the attack action
4. and pushes it on the queue.

You could add a cooldown timer to the hero, like `hero.cooldown = sol.timer.start(hero, 1000, function() hero:reset_attack_queue() end)`

Then whenever you handle an attack, call `hero.cooldown:set_remaining_time(1000)` to reset the cooldown.

You will probably have to tweak this concept to make it really work, but this is the way I'd approach it.
23
Bugs & Feature requests / Re: Methods from OLB resources not working?
« Last post by alexgleason on February 11, 2019, 08:42:46 pm »
I was able to find these methods by searching the OLB GitLab repo for their names: https://gitlab.com/search?utf8=%E2%9C%93&search=are_small_keys_enabled&group_id=&project_id=6933859&search_code=true&repository_ref=dev

Check out scripts/equipment.lua, looks like it has what you need: https://gitlab.com/solarus-games/zelda-olb-se/blob/dev/data/scripts/equipment.lua
24
Development / Re: combos...again
« Last post by ponderitus on February 11, 2019, 03:37:26 pm »
I was thinking about making a punch then kick just so that punch isnt constantly being spammed, i was trying to make Dbz characters and even though it looks pretty cool them spamming punching, it just got me thinking, this is where i got to with them...

https://www.youtube.com/watch?v=wREFt_7-HqE&feature=youtu.be
25
Development / Re: combos...again
« Last post by llamazing on February 11, 2019, 02:00:41 pm »
Yes, this is very possible.

It's difficult to provide help without knowing more details about what you are trying to accomplish, though.
26
Development / Re: video mode
« Last post by llamazing on February 11, 2019, 01:59:01 pm »
Change line 58 from:
Code: (lua) [Select]
text = sol.video.get_shader(),to:
Code: (lua) [Select]
text = sol.video.get_shader() and sol.video.get_shader():get_id() or "Normal",
If you plan on translating your game to other languages, then you should probably use string.dat entries for the names of the video modes, though.
27
Development / combos...again
« Last post by ponderitus on February 11, 2019, 09:10:11 am »
I've been thinking about combo's again like many other before and i was wondering whether its possible to have one item call another within a timer to kind of...pretend its a combo

eg... 'item A' on use
       create timer, if 'item A' used again within timer then
        use 'item B'

would this be possible?
is this a stupid way to do it?
is there a better way?
28
Development / Re: video mode
« Last post by ponderitus on February 11, 2019, 09:01:58 am »
yes that worked for switching it, now when i open the pause_options after changing shader, or starting the game with one active i get this

Info: Shader: 'hq2x'
Error: In on_started: scripts/menus/pause_options.lua:53: bad argument #1 to create (Bad field 'text' (string expected, got shader))
stack traceback:
[C]: at 0x01774540
[C]: in function 'create'
scripts/menus/pause_options.lua:53: in function <scripts/menus/pause_options.lua:32>
[C]: in function 'start'
scripts/menus/pause_submenu.lua:126: in function 'next_submenu'
scripts/menus/pause_map.lua:100: in function <scripts/menus/pause_map.lua:87>

this is 32-60 of pause_options
Code: [Select]
function options_submenu:on_started()

  submenu.on_started(self)

  local font, font_size = language_manager:get_menu_font()
  local width, height = sol.video.get_quest_size()
  local center_x, center_y = width / 2, height / 2

  self.column_color = { 255, 255, 255}
  self.text_color = { 115, 59, 22 }

  self.video_mode_label_text = sol.text_surface.create{
    horizontal_alignment = "left",
    vertical_alignment = "top",
    font = font,
    font_size = font_size,
    text_key = "selection_menu.options.video_mode",
    color = self.text_color,
  }
  self.video_mode_label_text:set_xy(center_x - 50, center_y - 58)

    self.video_mode_text = sol.text_surface.create{ -------------------------------------------------line 53
    horizontal_alignment = "right",
    vertical_alignment = "top",
    font = font,
    font_size = font_size,
    text = sol.video.get_shader(),
    color = self.text_color,
  }

submenu
Code: [Select]
  local submenu_index = self.game:get_value("pause_last_submenu")
  submenu_index = (submenu_index % #submenus) + 1
  self.game:set_value("pause_last_submenu", submenu_index)
  sol.menu.start(self.game.pause_menu, submenus[submenu_index], false)

pause_map
Code: [Select]
  elseif command == "right" then
    self:next_submenu()
    handled = true

I know this option doesnt even work the same anymore, but it would be pretty cool to be able to flick the game into grayscale at the touch of a button, go even more retro and feel like you're on the gameboy  ;D
29
Bugs & Feature requests / Methods from OLB resources not working?
« Last post by gmanplays@gmail.com on February 11, 2019, 05:37:49 am »
Hey again,

    Firstly I'd like to thank everyone on the server for being so helpful whenever I come with an amateurish problem I don't know how to solve. Really lively community around here and I genuinely appreciate the help. Anyways, moving on.
I've recently been studying up via the Tutorials, and I started using some of the resources provided there, in one instance in particular: In the episode covering the hud, in the description lies a link to some scripts used in Oni-Link Begins, which I promptly downloaded and installed, as an easy solution to a problem that I've spent more than two days on. However, when I ran it, I got one exception from each the key item script, and the key hud script, respectively. From what the error entailed, it looks like the engine doesn't seem to be recognizing any method that includes keys as a non-nil value. I checked the documentation, and I couldn't find any of those methods myself either, which indicates to me that there must be another script which defines those methods. I proceeded to sift through the directory where I got those scripts, looking for any code that mentions "keys", other than the ones I found and installed already.

Here's the exceptions:

1)
Code: [Select]
Error: In on_started: scripts/hud/small_key.lua:19: attempt to call method 'are_small_keys_enabled' (a nil value)2)
Code: [Select]
Error: In on_obtaining: items/consumables/small_key.lua:12: attempt to call method 'add_small_key' (a nil value)
If anyone could help me sort out defining those methods, I'd be much obliged. Thanks much for your time.
30
Your projects / Re: Pathfinding Experiment
« Last post by llamazing on February 11, 2019, 01:01:13 am »
I added teletransporter nodes to the master branch. Seeing the path drawn on the map while a teletransporter is used in the route is so cool!

All teletransporter type nodes get linked with every other teletransporter node on the map regardless of the layer or distance apart. To add one to your own map, simply add the custom property "node_type" with a value of "teletransporter" to an existing node (any entity with the prefix "node_").

I also added "stairs" nodes that link multiple layers. For these add the custom property "layers" with the value being a list of layers that they bridge (separated by commas, spaces or both), e.g. "1, 2". Stairs do not use the "node_type" custom property (so it's possible for a node to be both a teletransporter and stairs). Stairs are not used in my example quest and have only limited testing.

The second post is updated to give info about using the script in your own quest as well as some details about how the algorithm works.
Pages: 1 2 [3] 4 5 ... 10