Author Topic: Event Help: How could I make a auto start event?  (Read 1091 times)

So, I'm making a VCE RPG and I was trying to make it to where trees would automatically do the modVariable event, or a even better way to explain it would be I just want a event that has no input


Elaborate.
I would like to make a tree that has a pre-set amount of HP using <modVariable>Tree set 40> but, there is no way to automatically give the tree this variable unless I use a input, so it would look like this "onAuto-self-VCE_modVariable-brick Tree set 40". But there is no "onAuto" input but how is there a way to create something like onSpawn, but doesn't have to get destroyed and spawn for it to work.

what? you don't need this at all

just give the tree 40 health and make it decrease when they click it or whatever.

what? you don't need this at all

just give the tree 40 health and make it decrease when they click it or whatever.
Your answer made no sence

I am sorry to report that there is no such way (in my knowledge) of making any event fire without input. Probably for good reason. (who wants randomly fired explosions everywhere?)

okay so here's what i do


Every time the value would be decreased, I check to see if it is zero.
if it is it gets set to the max amount, if it isn't it gets decreased.

It looks something like this:

Quote
0, 0| onActivate | Self | VCE_ifVariable | hp == 0, 1 3
0, 1| onVariableTrue | Self | VCE_modVariable | hp == 40
0, 2| onVariableTrue | Player | VCE_modVariable | stuff + 1
0, 3| onVariableFalse | Self | VCE_modVariable | hp - 1

And so forth.

[quote/] On Activate
Quote
Theres a problem here.

[quote/] On Activate
Quote
Theres a problem here.
how did this happen?

Well, I know a way to do this but its complex and I would have to do it multiple times for each resource

Well, I know a way to do this but its complex and I would have to do it multiple times for each resource

Do what I said but edit it so that...

...

Why can nobody use insight these days?

There's also onMinigameReset
Just reset before anybody starts I guess?

He wants the variable to be modified as soon as the bricks are loaded I presume.

He wants the variable to be modified as soon as the bricks are loaded I presume.
yes. how does he suspect he can do that? by having no input.


If you don't have an input... what

He wants the variable to be modified as soon as the bricks are loaded I presume.

That's easy.

You can't automatically load a variable (unless you're me :cookieMonster:)

Just check if the variable is null, and if so, set it to 40.
Code: [Select]
[X] 0 [0] onActivate -> Self -> VCE_ifVariable -> [Health] == [ ] [1 1]
[X] 1 [0] onVariableTrue -> Self -> VCE_modVariable -> [Health] set [40]