object growing with time
#1

Is there any tutorial about how to make an object grow over time? I know that i should use timers, maybe object movement and resizing but how exactly im not sure about that.
Reply
#2

Object only can be resized if it's attached to player
Well there is another way,you could make a invisible skin(so it's only possible in 0.3DL),create a npc with invisible skin and attach the object to the npc.
Reply
#3

Maybe what you could do is use multiple objects, spawn the first one, destroy it after x seconds, then create another bigger one at the same time etc...
Reply
#4

then how does plants grow in those drug systems? i mean they are being set as objects too
Reply
#5

Quote:
Originally Posted by grymtn
Посмотреть сообщение
then how does plants grow in those drug systems? i mean they are being set as objects too
I clearly have no idea mate, just giving away some newbie tips haha
Reply
#6

Thank you anyways question is still active
Reply
#7

Those plants 'grow' because there are 3-4 different objects for the stages of growth, and they simply change to the next until harvest.

What you could try is attaching an object to an NPC, and have them underneath the ground, attaching all the plants to them, and resizing them that way. (NO IDEA IF POSSIBLE, just a random idea)
Reply
#8

They are likely doing one of these options:
- using different objects,
- having the same object but slowly raising it up, so more of it is visible every growth cycle,

I doubt they are resizing the object as that would be a lot more complicated albeit could be quite prettier.

I don't think you will find a tutorial specifically for this but you can take a look at other scripts that grow drugs and see how they do it, maybe adapt some of their ideas in your own way.

I recon you could do it similarly like this: player plants weed -> object is created, timer is started -> every timer is a single growth cycle, so after it's finished, the old object is removed; a new, bigger object is created, the state and data of the plant are updated and a new timer is started or the same one is looped -> player harvests the plant, timer is killed, player gets everything and the plant is deleted from the server.
Something like this, I guess.

Here is some filterscript I found
https://sampforum.blast.hk/showthread.php?tid=609790
Reply
#9

Thank you so much. Im feeling so dumb at the moment about how i couldnt think of this haha +Rep given
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)