[SOLVED] Object_PickUp() Not working?

Started by Miguel Rosso, Thu 27/06/2013 12:06:58

Previous topic - Next topic

Miguel Rosso

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.

Miguel Rosso

OMG! I just realized that the event for that is Interact! I'm sorry! :) (wrong) (laugh)

Khris

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.

SMF spam blocked by CleanTalk