Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Timer isn't being called
Author Message
Fake Lunk
Apprentice
*

Posts: 6
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jun 2012
Reputation: 0



Post: #1
Timer isn't being called
Hi everyone, in the script below I'm trying to create an object which checks the death condition of the player. However, When the timer completes, it doesn't get to the trigger. so the script stops before that. Anyone might wonder why the @Timer isn't being called?

ps: this script is supposed to work when the player is dead, in case this info is relevant.

thanks everyone

Code:
//**************************************************//
//**************************************************//
//************        EVENTS       ************************//
//**************************************************//
//**************************************************//

[EVENTS e_morte]
ON=@DeathCorpse

    //reduz ponto de desmaio
    //SRC.TAG.FAINT-= 1
    
    //removes food status
    findid.i_food_status.remove
    
       //in case there is any death status (just for tests)
    findid.i_death_status.remove
    
    serv.newitem i_death_status
    new.link= <SRC.UID> //this makes the player the link of the item
    
//**************************************************//
//**************************************************//
//************        ITENS *****************************//
//**************************************************//
//**************************************************//

    
[ITEMDEF i_death_status]
    id=i_memory
    name= Death Status
    type=t_eq_script


ON=@Create
serv.b item created //just for test
Timer= 3
serv.b o tempo é <timer>


ON=@Timer
serv.log timer called //just for test
LINK.say death status is working //just for test
Timer= 3
remove
return 1
06-20-2012 04:42 PM
Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #2
RE: Timer isn't being called
well your item is not placed on the world, you must place it on a character or a position.

Code:
serv.newitem i_death_status
new.link= <SRC.UID>
src.equip <new>
06-20-2012 09:13 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Fake Lunk
Apprentice
*

Posts: 6
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jun 2012
Reputation: 0



Post: #3
RE: Timer isn't being called
Thank you Shaklaban! I thought that when created it was placed in the same position of the SRC or ARGO.
Worked fine now!
06-20-2012 11:04 PM
Find all posts by this user Like Post Quote this message in a reply
Fake Lunk
Apprentice
*

Posts: 6
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jun 2012
Reputation: 0



Post: #4
RE: Timer isn't being called
Sorry for the bump! But I wonder if there's a way to link two different objects (one don't have any relation with the first or its "cont").
I thought I could search for the uid of one of the objects and apply it to the Link of the second... but how can I find for a specific UID?
thanks
06-24-2012 05:30 AM
Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #5
RE: Timer isn't being called
hmm personally i never use links, i just give them tag and call it by refs for example:

tag.myitem=<argo.uid> //for example we want to link argo

and when i need to call it:

ref1=<tag0.myitem>
if <ref1> //if the item exist
ref1.say hello
...
endif
(This post was last modified: 06-24-2012 05:49 AM by Shaklaban.)
06-24-2012 05:49 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Fake Lunk
Apprentice
*

Posts: 6
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jun 2012
Reputation: 0



Post: #6
RE: Timer isn't being called
that sounds a good approach, but still how could I get to set the ref as an other object that I can't find trhu argo/src/i ?

I mean, I got an object X that is equipped by a char, and I want object X to find object Y properties.

Object Y is in a room, far away from the char who's holding object X., for example. Is that possible?

Thanks for you help Shaklaban!
06-24-2012 05:55 AM
Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #7
RE: Timer isn't being called
Yes possible but you need to know uid of y, you can hold it on a tag on a x object.
06-24-2012 10:45 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Fake Lunk
Apprentice
*

Posts: 6
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jun 2012
Reputation: 0



Post: #8
RE: Timer isn't being called
ha! wasn't sure how to link the uid to the other object. Now I made it!
Thanks once again Shaklaban!

For further doubts I linked a object with another by either using "Link" or "Tag" (like Shaklaban said). You can link like that:
- get the UID (serial) number of the object you want to link
- when creating the other object, simply use something like:
Code:
On=@Create
Link=<uid.x> //where "x" equals the UID number of the object you wanna link

//OR - - > tag.otherobject = <uid.x> //same thing as above, using tag instead

thanks you all
06-25-2012 05:01 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)