Inventory

View: New views
6 Messages — Rating Filter:   Alert me  

Inventory

by NigeC :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

sorry to trouble you again.. but i'm having inventory problems now

I figured out how to pick items up, add to inv and lose the patch image on a slide, but i'm not sure how:
to remove the patch image from the cubic node you return to
use the inventory item ie the key on the door..

I tried working from the demo, but nothing was clean cut, picking up an item was easy but the key in the demo was more involved

here's what i have so far:
http://www.nigecstudios.co.uk/games/loo_v1.rar

on the first node the card on the floor is a patch on face 1.. i messed up and the card image its on two faces on the second node

going from node 2 you can enter a toilet and pick up the key
so i need to lose the key and card on node 2 once taken and the card on node 2

sorry for the dumb questions.. in my defence ii'm not a coder!

Re: Inventory

by Aidan Gauland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

NigeC wrote:
> sorry to trouble you again.. but i'm having inventory problems now

> here's what i have so far:
> http://www.nigecstudios.co.uk/games/loo_v1.rar
>
> on the first node the card on the floor is a patch on face 1.. i messed up
> and the card image its on two faces on the second node
>
> going from node 2 you can enter a toilet and pick up the key
> so i need to lose the key and card on node 2 once taken and the card on node
> 2
>
> sorry for the dumb questions.. in my defence ii'm not a coder!

I think I fixed all the problems you mention here, and your questions aren't
that stupid.  If you're not a programmer, then it can be hard to solve
problems like this.

How should I give you my changes?  Would it be OK to E-mail you a modified
copy of your Pipmak project directly?  I just don't want to send large
attachments without warning.

  -Aidan


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Pipmak-Users mailing list
Pipmak-Users@...
news://news.gmane.org/gmane.games.devel.pipmak.user
https://lists.sourceforge.net/lists/listinfo/pipmak-users

Re: Inventory

by NigeC :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Aidan Gauland wrote:


I think I fixed all the problems you mention here, and your questions aren't
that stupid.  If you're not a programmer, then it can be hard to solve
problems like this.

How should I give you my changes?  Would it be OK to E-mail you a modified
copy of your Pipmak project directly?  I just don't want to send large
attachments without warning.

  -Aidan
hi Aidan

Email will be fine nigec999@gmail.com
I'm really greatful for the help, if you don't ask questions you never learn ;) and I'll add this part to the other  demo, I think we'll have all the basic bases covered then

Thanks again
Nige
Nige

Re: Inventory

by NigeC :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

With Aidan help i now have the inventory and items removed from nodes.. (thanks :) )

I've managed to get a key working on a door using the demo as reference but i need to fine tune it a bit, currently the door unlocks an i go to the next node with the key.. i'd like the door to unlock and the key stay there, and the user click on the handle to leave, the key turn is animated key2.jpg to key5.jpg
a message if the door is locked or unlocked
slide { "door.jpg" }
local locked = sound { "doorlocked.ogg" }
local open = sound { "dooropen.ogg" }
local key
hotspotmap "hotspot.png"
hotspot { target = 7, effect = { pipmak.dissolve, 2 }, cursor = pipmak.hand_back,  }

--key actions
        hotspot {
        onmousedown = function()
                if key:isvisible() then
                        local k = 4
                        pipmak.schedule(
                                0,
                                function()
                                        k = k - 1
                                        if k > 0 then
                                                key:setimage("key"..k..".jpg")
                                                return 0.05
                                        else
                                                key:setvisible(false)
                                                                                                                        inventory:message("pickup", "key")

                                        end
                                end
                        )
                elseif state.inventory[state.inventory.carried] == "key" then
                        local k = 1
                        inventory:message("drop")
                        key:setimage("key.jpg")
                        pipmak.overlaynode(100):message("write","the door is unlocked",{size=20,delay=4,posy=-30})
 open:play()
               
                        key:setvisible(true)
                        pipmak.schedule(
                                0.05,
                               
                                function()
                                        k = k + 1
                                        key:setimage("key"..k..".jpg")
                               
                                        if k < 4 then return 0.05 end
                       
                                        pipmak.dissolve(2)
                                        pipmak.setviewdirection(270,0)
                pipmak.gotonode(1)
                                end
                        )
                end
        end
}
onleavenode ( function() if key:isvisible() then inventory:message("pickup", "key") end end )
key = patch {  x = 522, y = 207, visible = false, image = "key2.jpg" }
thanks in advance
Nige

Re: Inventory

by Christian Walther :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

NigeC wrote:
> thanks in advance

That sounds like you're expecting an answer, but I can't see a question
in your post... can you elaborate?

  -Christian


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Pipmak-Users mailing list
Pipmak-Users@...
news://news.gmane.org/gmane.games.devel.pipmak.user
https://lists.sourceforge.net/lists/listinfo/pipmak-users

Re: Inventory

by NigeC :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Christian Walther wrote:

That sounds like you're expecting an answer, but I can't see a question
in your post... can you elaborate?

  -Christian

sorry.. explained it better in the "my demo" thread with a project link