Lrn2Dev: “Spawn Camping Noob”
hurr hurr jab at my lack of exp in respawn mechanics.
I finally figured it out…and thanks to @bloodshadowsrpg for providing the actual missing piece (even though his initial intent was giving me a workaround to my problem..) which was a condensed tree spriteset i had to put into the character graphics folder.
And special thanks to gamingpixie for much needed love and support. *hugs* I love ya Ro. <3
By using this treeset, it was the missing piece i needed. Apparently the respawn code from Galv only procs one script line in the “respawning” page of an event. More details on that later…
So here’s how it works:
The Tree has 3 event pages.
-has the (full) tree graphic.
-checks if player has one of the 8 woodaxes equiped
-checks if the axe is “strong enough”
-plays chopping sound
-checks and gives certain amount of items based on the woodaxe used.
-flips self switch A
-If the player has no axe or a weak axe, the character comments on this problem.
Page 2: (activated from self switch A)
-has wood stump graphic
-checks if you have the correct seed item.
-plays seed planting sound
-removes the needed seed item by 1
-starts respawn timer with Galv’s respawn script: set_spawn(0,0,5)
-the 0,0,5 is refering to the map, event and the seconds for the timer. setting the map and event to 0 tells it to do it for “this event” the script line is in.
-self switch B is turned on
-self switch A is turned off
Page 3: (triggered by Self Switch B)
-has stump graphic
-uses Galv’s respawn code via the “movement type” being set to “Custom” and inputting a script line do_respawn?(“B”,false) .
-that script line basically flips Self Switch B OFF once the spawn timer is finished counting down.
-once switch B turns off, the tree graphic appears again and the player can harvest the tree again.
I then applied this to various ores, only i took out the “replanting” event page..so they just naturally respawn whereas the trees can respawn once you’ve used a seed item on a stump.
The timers are ran separately and thus trees will respawn at different times depending on when you cut them. They ALSO keep counting regardless of if you’re on that map screen! Even BETTER…i can copy paste the same tree/resource event and they act like their own individual selves!!!
Basically… FREAKING SUCCESS!!!