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
Development / how do you save a number?
« on: Today at 11:21:12 am »
I've made a little script/ fishing game where your fish wins you prizes...everything works fine until i save and reopen the file...its basically:

Code: [Select]
if size <= 6 then
elseif size >
win = size
size reset to 0
and then theres a seperate npc with a dialog stating the win number:-
Code: [Select]
game:start_dialog("", win, function()

now if i move maps and come back in it all works fine...but if i save the game and return...the value of "win" is set back to nil, how do i get the value of win to save?

or do i need to make save variables for each
Code: [Select]
if win = 1 then
 game:set_value("win_is_1", true)
else if win 2 then.....

and then write out a dialog for each outcome?

Development / Re: does anyone know what this means?
« on: March 18, 2020, 09:07:15 pm »
sweet man cheers for the info, I wasn't able to download imagemagick i think the site is down so i tried just making a new blank sheet and copying the sprites over and overwriting worked. was a png i had as an overlay the "map name" png i have pop up on start. which is why it wasnt happening on any of the other maps with the same tileset ect.

my project isnt online anywhere atm ive been looking into how to do it, made a github account today so it might be up soon

Development / does anyone know what this means?
« on: March 17, 2020, 05:45:06 pm »
When i close the game on certain maps, this pops up...

Code: [Select]
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB

does anyone know what it means?

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

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

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

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

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 :)

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

Code: [Select]
function npc_1:on_interaction_item(item_used)
  if item_used == boomerang then"secret")

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

Development / Re: :on_interaction_item(item_used)
« on: September 06, 2019, 06:27:05 pm »
I don't know what that how would you get that to work then?

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

Code: [Select]
function custom_sensor_1:on_interaction_item()
  if item_used == "boomerang" then

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

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

Code: [Select]
function custom_sensor_1:on_interaction_item(boomerang)"secret")

function npc_1:on_interaction_item(boomerang)"secret")

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?

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

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

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 the flute and the bird in link to the past

Pages: [1] 2 3 ... 5