Instructions are in the video description:
Replying to this gentleman here:
import bpy
FRAME_START = 100
FRAME_END = 200
currentFrame = bpy.data.scenes["Scene"].frame_current
setFrame = bpy.data.scenes["Scene"].frame_set
if currentFrame < FRAME_START or currentFrame > FRAME_END:
bpy.data.scenes["Scene"].frame_set(FRAME_START)
elif currentFrame >= FRAME_START and currentFrame < FRAME_END:
setFrame((currentFrame + 1) % FRAME_END)
Thank you for the code
āUse Viewport Renderā must be checked else the particles are not visible.
āUse Viewport Renderā must be unchecked if you want the replacemesh() code function to run.
A bit of a dilemma for those who want to use both!
I agree. If anyone has a better solution Iāll be sure to edit the video description.
I tried the code above for simulation nodes, and it does work for the simulation geometry nodes modifier.
However, it jumps back very briefly to frame 0 upon passing the FRAME_END variable which creates a small āblipā in the simulation, thus resetting the simulation node animation. This isnāt what I want for particle simulation nodes in UPBGE, so is there a way for me to avoid the zero frame jump issue?
For me, I mapped the FRAME_START to an integer property and the FRAME_END is likewise mapped to an integer property. They work as expected except for that small snap back to frame 0. My aim is to get rid of that small āsnapā or reset that is causing the simulation to jump back to frame 0.
Hi. Apologies for the late reply. I have no idea. I donāt really use UPBGE anymore. Sorry.