Jump to content

Scripting Help


Myris

Recommended Posts

I am not very good at scripting, not good at all, since this is one of the first times I tried it.

 

Therefore I want to ask how I can make one or more static objects dissapear as soon as the player picks up a certain object. I have been trying but it seems that I cannot find the right commands.

 

Can anyone around here please help me?

Link to comment
Share on other sites

Thanks for the answer Lord of the Cheese. I will remember to give the item a unique ID, which I forget in the first place.

 

 

EDIT: I tried the following script:

begin _higher

If ( Player->GetItem, "item player should pick up" == 1 )

"static to remove"->disable

endif

end _higher

 

But it is still not working, I am getting an error that says:

'Could not find variable or function "GetItem."'

 

Can anyone help me with this or at least tell me what I am doing wrong?

Link to comment
Share on other sites

heh, well thats my fault because im stupid, its GetItemCount so:

 

begin _higher

If ( Player->GetItemCount, "item player should pick up" == 1 )

"static to remove"->disable

endif

end _higher

 

and i just want to make sure you understand that "item player should pick up" is has to be replaced with the ID of the item you want the pc to pick up before disabling the static

and "static to Remove" has to be replaced with the ID of the unique static that will be disabled

Link to comment
Share on other sites

Oh Serrieth, that's a blatant example of thread hijacking. Make your own thread please ;)

 

EDIT: Oh wait, you DO have your own thread. Keep it there then :P

Link to comment
Share on other sites

Thanks Lord of the Cheese, it is working exactly as it should. And I know that "item player should pick up" should be replaced by the items unique ID.

 

Since the answer to this topic is given, any of the moderators may lock this topic as they wish.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...