Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Miguel Rosso on Thu 27/06/2013 12:06:58

Title: [SOLVED] Object_PickUp() Not working?
Post by: Miguel Rosso on Thu 27/06/2013 12:06:58
Hey!
I started using AGS three days ago, so, you know, I'm quite a noobish.
I added an object to a room, and added a pick up function to it. The problem is, that when I try to pick it up, nothing seems to happen!
I also added a Look event/function, and it works perfectly. In fact, I tried almost every other event (except for the Usermodes), and they work just as fine!
I don't know what I'm doing wrong, I have reinstalled AGS, but nothing seems to work. Is something wrong?
PS: Here's the PickUp() function:
Spoiler

function TestObj_PickUp() {
  cRocketman.Walk(130, 49, eBlock, eWalkableAreas);
  cRocketman.AddInventory(iKey);
  Display("Hello!");
}
[close]
I have also tried, just for testing purposes, to only display a text, and to change eBlock to eNoBlock, but nothing works.
Title: Re: Object_PickUp() Not working?
Post by: Miguel Rosso on Thu 27/06/2013 12:10:12
OMG! I just realized that the event for that is Interact! I'm sorry! :) (wrong) (laugh)
Title: Re: [SOLVED] Object_PickUp() Not working?
Post by: Khris on Thu 27/06/2013 12:52:36
Just for reference, we don't need to color our code ourselves, there's the code tag: [code=ags][/code]
Just select "AGS" from the "Code" dropdown menu when composing a post.