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.


Messages - ponderitus

Pages: 1 [2] 3 4 5
16
Development / Re: :on_interaction_item(item_used)
« on: September 06, 2019, 06:27:05 pm »
I don't know what that means...so how would you get that to work then?

17
Development / Re: :on_interaction_item(item_used)
« on: September 06, 2019, 06:01:01 pm »
nope that doesn't work i already tried that :( thanks though

nothing happens at all with the boomerang or anything in that situation and if you put an else in...like

Code: [Select]
function custom_sensor_1:on_interaction_item()
  if item_used == "boomerang" then
    hero:freeze()
    sol.audio.play_sound("secret")
  else
    sol.audio.play_sound("wrong")
  end
end

the "else" will always be activated...even when using a boomerang

18
Development / :on_interaction_item(item_used)
« on: September 06, 2019, 05:35:02 pm »
I was wondering if you can make this item specific? it seems to activate if any item is used..eg.

Code: [Select]
function custom_sensor_1:on_interaction_item(boomerang)
sol.audio.play_sound("secret")
end

function npc_1:on_interaction_item(boomerang)
sol.audio.play_sound("secret")
end

this would be activated if i used a bow or any item at all.

is there a different way to have something happen when an certain item is used in a specific place? maybe im looking in the wrong place?

19
Development / Re: Seach for an entity?
« on: August 14, 2019, 03:20:33 am »
you know whats funny,  that was the first thing i tried and the original plan but i couldnt find a way to get hero to ignore suspended so i gave up and tried another route, I could only figure out how to make an NPC or timer ignore suspended...when that didnt work i thought its time i ask for help...should have just asked straight a way lol. would have saved me a lot of time, i wasn't adding :get_sprite() originally so it didnt work. That one line of code has made everything better...and made me have to erase another 300 lines lmao! Thanks as always

20
Development / Re: Seach for an entity?
« on: August 13, 2019, 07:06:09 pm »
just incase anyone is wondering. i got around this by making the enemies walk an empty path and then enemy:restart() at the end. technically does freeze them lol

21
Development / Re: Seach for an entity?
« on: August 12, 2019, 08:59:57 pm »
yeah i just wrote that as an example of what i wanted to happen and then realised that no such thing exists and i didnt have another way of explaining what i wanted to happen. I honestly have no idea how to perform what you suggested in adding it to the enemy_meta but ill be looking into it.

my enemies are pretty simple, I havent made any new ones that dont basically mimic something from the past...other than that deku scrub that you made for me lol.

I thought it would open up for being able to use like a magic attack, like a little "cutscene" could happen and some things could appear on screen, then any enemy within a radius get damaged by it or are turned into something like a pot or a flower...I was just messing around making a little ocarina item though lol. just so at any point you could whip out an ocarina and play it. i got it working all fine but then realised i hadnt put anything in to stop things moving and wondered what would happen if an enemy was present...and surely enough they just kept moving. so i set game:set_suspended(true) on using and false on finish...which works for the enemies...but also stops the hero...which means the correct animation loads but it just stays at frame 1.

it could also be used for some kinda fast travel applications aswell, eg. item loads a dialog, answer leads to cutscene of being picked up and then teleport happens....like the flute and the bird in link to the past

22
Development / Re: Seach for an entity?
« on: August 12, 2019, 11:10:56 am »
cheers for the help guys, the code max gave kinda works, it finds them...but the enemy:freeze() gives me

"attempt to call method 'freeze' (a nil value)"

i tried using enemy:immobilize() but that pushes the enemy away from the hero so it looks kinda weird.

23
Development / Seach for an entity?
« on: August 09, 2019, 11:13:20 am »
Hey, long time. I was working on an item the other day and wondered if there is a way to check for entities on the map on use..I was trying to make something that would freeze an enemy if it exists

ie.
Code: [Select]
function item:on_using()
  item:check_enemy()
  if entity type enemy then
    enemy:freeze()
    --function of item, function()
     enemy:unfreeze()
    end)
  else
    --function of item
  end
  self:set_finished()
end

function item:check_enemy()
--check map for enemies
end

24
Your scripts / Re: Delayed Closing of a Dialog Box
« on: May 18, 2019, 03:27:39 am »
Im a bit drunk but are you after something like

Code: [Select]
if answer == 1 then -- Yes
sol.timer.start(map, 500, function() -- (1000 = 1 second)
sol.audio.play_sound("Blah_blah")
end)
else -- no
sol.timer.start(map, 100000000000, function()
end)

-- this might not be accurate, also dont use this as you'd be waiting 100,000,000 seconds for it to close on a no situation....again, drunk.

25
Your projects / Re: Ocean's Heart Beta Testing
« on: April 15, 2019, 09:28:17 am »
Hey!

Awesome to hear you are so far through man...so quickly as well

I'd love to test it out, is there anything in particular you want us to focus on?

26
Development / Re: stop_dialog
« on: March 08, 2019, 07:25:50 pm »
i dont know, i havent got to setting positioning yet thats a problem for later, ive tried putting it in my script a few ways but havent been successful yet

27
Development / Re: stop_dialog
« on: March 08, 2019, 11:31:26 am »
to add to this, how do you change the style of the dialog box to "empty"? do you put it as a property inside the "languages > en" or is it defined inside the map?

the dialog_box.lua says there's either a "box" or "empty" style and "box" is the default

28
Development / Re: stop_dialog
« on: March 08, 2019, 10:45:15 am »
ok, so i think i get it now, i was calling a function inside the dialog which meant the timer wasn't being activated, also that i was calling the timer in context of the map not the game, so it should work like this? by calling the timer alongside the dialog

Code: [Select]
game:start_dialog("this_needs_interupting")
sol.timer.start(game, 1000, function()
game:stop_dialog()
end)

is this right? It works...lol. Is there a way to call the next lines of a dialog in this way?

most of the dialog i'd like to work in this way only has 3 lines anyway (or can be changed) so its not a huge problem, just trying to learn

29
Development / Re: stop_dialog
« on: March 08, 2019, 10:13:32 am »
yeah i understand that that i just wrote that as an example of what i wanted to happen, is there a way to unpause the game whilst in the dialog? do you mean changing the timer to "game" instead of "map"?

30
Development / stop_dialog
« on: March 07, 2019, 09:28:28 pm »
hey, how do you get a dialog box to close itself rather than having to have an action pressed? is this possible? Id only want to use this in "cutscenes" and such, not in regular interactions with npc's

eg
Code: [Select]
game:start_dialog("this_needs_interupting", function()
  sol.timer.start(map, 1000, function()
  game:stop_dialog()
  end)
end)

according to the documentation this is possible but i cant seem to make it work, would it also need a different function if the dialog was more than 3 lines? (not a problem to make things 3 lines if dialogs can be "auto closed")

Pages: 1 [2] 3 4 5