A question that I haven't see asked.

Started by Magus, September 13, 2010, 03:18:33 pm

Previous topic - Next topic

monzdname

 :haha: THANKS VALDRED
that code helped me a lot..
its working fine now..
i just didn't know what ID would I input.

THANKS A LOT  :)

YeahBrown

January 16, 2011, 09:25:39 pm #21 Last Edit: January 16, 2011, 09:30:03 pm by YeahBrown
Well, that script its OK, but that can made without script, I'll explain an engine that I think you had to do from the beginning:
You have to use 4 variables, 2 for the coodinates X and Y for the rock (lets say a "Rock" and a "Button"), and the other 2 for the coordinates X and Y for the button:
The 2 variables for the rock lets call it "Rock X" and "Rock Y", and the variables for the buttom lets call it "Buttom X" and "Buttom Y"......

In the event of the rock: you do all you have to do for move the rock, and at the end, You must match the variables "Rock X" and "Rock Y" to the coodinates X and Y of the Rock....

In the event of the buttom: You must match the variables "Buttom X" and "Buttom Y" to the coodinates X and Y of the Buttom, then put a conditional branch like this:

-Conditional branch: variable [001:Buttom X]==[003:Rock X]
--Conditional branch: variable [002:Buttom Y]==[004:Rock Y]
  -
  :Exception
  -
  end
-
:Exception
-
end


Inside this conditional branch, activate a switch or do what you want to happen, and put this event in Parellel process and oviously, at the end, activate a selfswitch for desactivate the event, and its ready!!, now when you put the Rock above the buttom, something will happen....

I use this engine in game all the time, and works perfectly,
Well, the script its great, this engine is just another way to do this....

Greetings.....

By yeahbrown08 at 2010-12-19

Valdred

A script takes less effort, less lag and less time

YeahBrown

I agree, excuse me if you think I mean to offend, I just wanted to show you one way to do it with an engine because I saw that many people didn't know......

By yeahbrown08 at 2010-12-19

Valdred