can i add the requirement = condition to

General Chat, Comments
Post Reply
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

can i add the requirement = condition to

Post by KaL »

i want to add the requirement = Condition to the usage_code = Action:

example: day hour >= X ( i want this in the usage_code= Action)

can you show how to do this?

i'm talking about the ingame "object" under Table
when you are about to create a new object.

i want to the player to purchase the object from the shop
and use it for a few hours then it will be removed from their inventory.

also how do i add the "duration" from the module "works" to the object as another feature. i did copy the table but don't know how to link it or add the extra roll box in the object creation for ingame.
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: can i add the requirement = condition to

Post by a_bertrand »

The game doesn't contain objects usable only for a given time. You will have to code it somehow. Keep in mind that if a player remove the item, the left usage should follow the object, so you must change basically all the item handling.
Creator of Dot World Maker
Mad programmer and annoying composer
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

Re: can i add the requirement = condition to

Post by KaL »

Actually I prefer it to follow the item. How about the "duration" feature? Just like the one on "works" module. Can I use phpmyadmin to create a table like that one? I want to use that feature and added to the object creation.
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: can i add the requirement = condition to

Post by KyleMassacre »

Why not add something to a user variable like a time limit or something? This way when they use the item its gone and they have X amount of time to do something before it runs out.

I believe I showed you before where you can create a function in a lib file for a module and then add it to your wizard tables to execute the function(s). Then when you create your new object you have those as a condition (some sort of fucntion to check) and an action (this would add to the user variable).
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: can i add the requirement = condition to

Post by a_bertrand »

Sure you can use phpmyadmin to create tables. Nothing that bad can happen. If you break everything, nothing prevent you to re-install the engine ;)
Creator of Dot World Maker
Mad programmer and annoying composer
Post Reply

Return to “General”