Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - ponderitus

#46
Development / Re: Setting Up A Basic Equipment Menu?
April 25, 2018, 05:43:21 PM
mad that I mentioned your project and you answered. It was actually your mandrake that made me think of making it. When i walked up to it thinking it was a normal bush then boom, enemy. was great. but then left me looking for a shooting mandrake...
I've been looking through your enemies, I love your Ogre..or the "melee attacker", I wanted to replicate that so it attacks multiple co-ordinates, like the Club Moblins do. I love your game, the art style is amazing, and the dialog box!
I get how i need to go about making the enemy with those functions, I've read a lot of enemies now lol. I just don't really know how to make the functions yet tho, the whole finding where the hero is. this would be my 1st enemy. It's starting to make more sense every time I read them.

But for your inventory try copying over files from other projects that have working menus..but make sure you have all the files they do, check you have all the language strings as well as dialogs to make them work, then...edit them, that's how I got mine working eventually. Or the reverse. get a Master folder and delete everything until you have a blank project with nothing but a blank map and a working menu. then add your files into that project and edit around that...Obviously don't delete the Items in the project until afterwards
#47
Development / Re: Setting Up A Basic Equipment Menu?
April 25, 2018, 11:47:42 AM
Yeah I added a enemy:on_custom_attack_received() to counter that, so they break when hit with swords. Haven't played with the shield yet just use it as a defense upgrade really. Seems like you know your stuff though. Let me know if you create anything interesting. I'm always after new enemies, mine suck! Been trying to create...essentially a Deku scrub for a few days, one that will be "sleeping" then will "wake up" when hero is within distance and shoot if he is in-line with x or y. Then if you are too close it will "sleep" again. so can't be killed with melee unless its frozen, so only by its own bullets being returned or arrows...I have no idea where to start.

The teleporting Octorok in Ocean's Heart is pretty cool, and his Ogre. If you haven't seen Ocean's Heart I'd go check it out. By Max.

http://forum.solarus-games.org/index.php/topic,1107.0.html
#48
Development / Re: Setting Up A Basic Equipment Menu?
April 24, 2018, 01:45:28 AM

  game:get_item("pegasus_shoes"):set_variant(1)
  game:get_item("magic_bar"):set_variant(1)
  game:get_item("flippers"):set_variant(1)
 
those will let you test your boots, flippers and bar as they don't need to be assigned to use, or at least don't in mine. you can also do the same with the feather with a couple of tweaks

have a read of all the scripts you have, they may look like jibberish at first but after a while they will make sense I promise (could be months, I still don't understand most). But random bits will end up helping you. I couldn't get an Npc to change animation for the longest time, abandoned it, then read a random map from christopho and the team and saw I needed


  name:get_sprite():set_animation("")
  name:get_sprite():set_direction("")...ect

and the game changed....

Don't be afraid to ask a seemingly stupid question though, I've held back from asking lots of things and it's stunted my progression immensely. Someone could and would have given me the answer in seconds. Also, they might not be so stupid. Pretty sure I asked something like this when I started.

It's a shame the Youtube tutorials finished, they helped me sooooo much when I was starting, you don't even want to know what I was doing to get my bridges to work before that tutorial came out, I had hundreds of sensors. Hopefully they will come back one day, there's still a hell of a lot to cover. It would also be nice if there were more examples in 'Solarus 1.5 - Lua API reference'. That thing is confusing as hell sometimes.

What are you looking to make?
#49
Development / Re: Setting Up A Basic Equipment Menu?
April 24, 2018, 12:04:51 AM
I can't really help you with a complete Pause menu, inventory and what knot....it involves a lot of drawing and specific tile placement and other things, its a lot of work. Or at least is for me. If you are trying to copy one, first read through the script and find out if you've got all the files it's going to need to use first. it might require an image that's in the language folder that you don't have or another script.
If you just want to test an item you can so it by putting something such as :


  game:get_item("boomerang"):set_variant(1)
  game:set_item_assigned(1,game:get_item("boomerang"))

  game:get_item("hookshot"):set_variant(1)
  game:set_item_assigned(2,game:get_item("hookshot"))


in your initial_game.lua, or wherever your starting values are made

Hopefully this helps, I may not have understood what you meant. Welcome to the community
#50
Your scripts / Re: [Big Layer] Solarus-online
March 24, 2018, 08:18:11 PM
Wow, I haven't been on here for a while so I've only just seen this...this is amazing! I haven't tested it or anything but it started my imagination going crazy with new types of quest that can be made....new modes and types of gameplay....

can the users interact with eachother? so that you could make something like...zelda bomberman for example? or a battle arena? Not what I intend to use it for, just wondered.
#51
Development / Re: entity sounds
May 13, 2017, 11:16:44 PM
cheers man, that was my quick fix, just rename my files to be named the same and delete the old ones
#52
Development / entity sounds
May 13, 2017, 07:31:09 PM
Does anyone know where the code is which selects the sounds entities make? I want to change the noise the chest makes when opening, I know how to change it for a chest on a map (as below), but i wanted to change all the sounds from the Alttp ones, like I also want to change the noise a block makes when pushed and so on.

function chest:on_opened()
  sol.audio.play_sound("chest_small")
end
#53
Development / Re: Script working part of the time
May 13, 2017, 05:30:05 AM
I think i got it, the problem I think was that I was setting the npc to visible true/false rather than enabled so when I was trying to interact with the npc it was 50/50 whether the invisible or the real npc was being interacted with. since changing to enabled I've tested it 5 times and its worked all 5.
#54
Development / Re: Script working part of the time
May 13, 2017, 03:31:52 AM
sorry, what i meant is if i test the script once it may work, then the next time i test it (after making no changes) it won't work. then next time it may or may not again.

how do i add debug print statements?
#55
Development / Script working part of the time
May 12, 2017, 06:16:53 PM
Hey, I've tried to make a simple npc script, but for some reason it only seems to work half the time....i can load the map and it will work....then literally close and re-open the console and it wont work anymore...then next time it might. It seems like it works about 20% of the time, can anyone tell me the reason for this? Just trying to make her walk at the 1st time on the map up to her point she will be at for the rest of the game and freeze the hero until she is there and has spoken her initial dialog, its the interaction bit at the end which seems to be failing i should mention

Code ( lua) Select

local map = ...
local game = map:get_game()
local hero = map:get_hero()

if game:get_value("open_walk") then
  girl:set_visible(true)
  fake_girl:set_visible(false)
  else
  girl:set_visible(false)
  fake_girl:set_visible(true)

local npc_movement_2 = sol.movement.create("target")
  npc_movement_2:set_speed(64)
--  npc_movement_2:set_smooth(true)
  npc_movement_2:set_ignore_obstacles(true)
  npc_movement_2:set_target(girl)
  npc_movement_2:set_ignore_obstacles(true)
  npc_movement_2:start(fake_girl, function()
  girl:set_visible(true)
  fake_girl:set_visible(false)
  game:start_dialog("girl.down_here")
  game:set_value("open_walk", true)
end)
end

function girl:on_interaction()
    game:start_dialog("girl.hello")
end


I also wanted to make the hero freeze on map start until this quest but I haven't been able to make that function yet, i know its hero:freeze() then hero:unfreeze()

I moved the end at line 24 to 29 and that seemed to help a little but it's still failing about 60% of the time
#56
Development / Re: Trying to make an NPC disappear
April 30, 2017, 05:11:23 AM
That's perfect, Once again amazing! I managed to get the extra dialog in myself. I did try using map:on_started() but i didn't put destination inside the brackets though, that wasn't my only mistake :P You're so good at these things.
#57
Development / Re: Trying to make an NPC disappear
April 30, 2017, 02:21:33 AM
i also forgot that i needed to change the dialog to a function with
Code ( lua) Select

game:start_dialog("meeting.1", function()
   if answer == 2 then -- No
   game:start_dialog("meeting.1")
#58
Hi guys, I've been trying to make a sensor which on activated a dialog will load from an NPC who will then walk off and vanish, I've tried to make it a save game variable so that the sensor and the NPC are gone forever after this. I can't seem to get my NPC to disappear when the map reloads, I realize the below will make him disappear when the sensor is activated again (which is what it is doing). Can anyone show me how to make it do what I need it to do. I tried lots of things but I can't seem to get it to work

Code ( lua) Select

local meeting_quest_1 = false

function meeting_sensor:on_activated()
   if game:get_value("meeting_quest_1") then
   worker_npc:remove()
   else
      game:start_dialog("meeting.1")
      hero:freeze()
      local path_movement = sol.movement.create("path")
      path_movement:set_path({ 2, 2, 2, 2, 2, 1, 1, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0 })
      path_movement:set_ignore_obstacles(true)
      worker_npc:is_traversable()
      path_movement:set_speed(64)
      path_movement:start(worker_npc, function()
      worker_npc:remove()
      game:set_value("meeting_quest_1", true)
      hero:unfreeze() 
      end)
   end
end


I kept getting these errors when i tried to get it working outside the sensor:on_activated
Error: attempt to index global 'worker_npc' (a nil value)
Error: attempt to index global 'meeting_sensor' (a nil value)
but as those are names of entities on my map...isnt that enough to use them just as : worker_npc:remove() ?

as in
Code ( lua) Select

map:on_started(function()
if game:get_value("meeting_quest_1") then
worker_npc:remove()

#59
Development / Re: Trying to make an NPC dialog
April 27, 2017, 06:47:28 AM
Cheers, I will be :) I just don't want to flood the message board with questions ALL the time

Yeah I've watched them countless amounts of times, that's how I've got where I am. I'm trying to make sense of the Lua api as well, I've always got it open next to me whilst I'm trying something, as well as the Christopho tutorial (if there is one). I'm more of a visual learner though so it's hard to understand what it's trying to show sometimes or how to implement it without it actually showing me, I'm getting better though. But that's why i love Christopho's tutorials so much, there's so much info in them, much more than the title suggests. It's amazing how far I've got with just them as reference, I can't wait for the next one. Will probably make me realize I've been doing something else wrong for ages :P

It's a shame he's the only person who does any sort of videos. I've tried watching his live coding sessions because I'm sure I'd learn loads through watching that...But I don't speak French so it's hard to understand whats going on (especially in the chat bar) and youtube translations suck.
#60
Development / Re: Trying to make an NPC dialog
April 27, 2017, 02:32:27 AM
Thank you so much, it would have taken me forever to figure that out. I wish there were more little scripts laying around to work with like this as I'm at a point now where i can kind of read and understand scripts but I'm having trouble writing them. But with other scripts to read that relate I find it easier.

I've been reading a lot of the map scripts from other games but without being able to see them in action it's hard to see exactly what happens at what point, ie, i was trying to get a dialog to show after the npc had reached its destination but couldn't figure out how to get it to appear at any point other than instantly. I have now because I was able to find a guy from one of the solarus games who does the same-ish actions (speaking after an action not before) and see where I'd gone wrong

I can't believe you'd done it and replied within a hour...wish I'd have come back online earlier. I tried another 100 things after I'd posted this. Thanks again