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 ... 5
1
Development / how to make a 'code/password'
« on: September 21, 2019, 01:57:38 am »
Hey Guys, I was wondering how to make a sort of code or password, as in enemy must be killed in a certain order to open a door/make a chest appear..so that if they are killed in the right order then x will happen but if the wrong order then everything is reset....

where would i start with this?

so that (1,2,3) opens the door but all other variants eg, (3,2,1) (2,1,3) ect would reset?

literally stuck at the start with this one...

would i have to make a bunch of save variables for each on_killed? depending on which have been killed before it?

2
Development / Re: Text box appearing when getting an item
« on: September 12, 2019, 04:11:58 am »
i dont know what you're doing but you shouldn't have to do anything like this, where have you started from? id suggest redownloading solarus and the resource pack if thats what you are using

3
Development / Re: Text box appearing when getting an item
« on: September 12, 2019, 12:53:47 am »
have you tried with an npc? the text for the save and quit is most probably a menu not a dialog so thats why that would still show.

make an npc and set it to speak...see if that brings an error

4
Development / Re: Text box appearing when getting an item
« on: September 09, 2019, 11:51:37 am »
do you get an error when you open the chest?

what does your main.lua look like? paste it after clicking the hashtag icon "insert code" button. (12th button 2nd row)

in the quest editor when you click on languages there will be an "en"...right click that and "open dialogs" to get to the dialog editor and if you havent got a dialog for that item..the rest are under _treasure.sword.1, _treasure.shield.1, ect...

5
Development / Re: :on_interaction_item(item_used)
« on: September 09, 2019, 11:37:15 am »
Cheers bro I totally get what you're saying.

I did try a variation of this but i never got the "game:get_item("boomerang")" part of it.

what you wrote makes perfect sense thought and I've used that so many times on other things, nice explanation for anyone else that gets stuck on something like this.

and...yes those last 2 lines are indeed what i needed. thanks :)

6
Development / Re: :on_interaction_item(item_used)
« on: September 06, 2019, 08:09:47 pm »
so...

Code: [Select]
function npc_1:on_interaction_item(item_used)
  if item_used == boomerang then
    sol.audio.play_sound("secret")
  end
end

i just tried that and that doesn't work either....

7
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?

8
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

9
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?

10
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

11
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

12
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

13
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.

14
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

15
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.

Pages: [1] 2 3 ... 5