1

(64 replies, posted in News)

I did for Linux x64 because the other links do not work.

You need to change the render in a fixed.
http://savepic.net/7422517.jpg

3

(2 replies, posted in Showcase)

I just set waypoints along the way. You can see them on video (small white cubes)
http://savepic.net/6356479m.png

4

(2 replies, posted in Showcase)

the prototype of the tower defense games.

5

(64 replies, posted in News)

Linux 64 : bryce : link

       
The link does not work, sad  where can I download it?

Sphere = getObject("Sphere")
bullet = getClone(Sphere)

function onSceneUpdate()

    pos = getPosition(bullet)
    print("x="..pos[1].." y="..pos[2].." z="..pos[3]) --checking.
    translate(bullet, {0, 1, 0}, "local")

end

good job, Sponk!!!
is it possible to implement the creation of primitives? createCube(), createSphere() and so on?

8

(3 replies, posted in General)

all your requests I made in one project.
video: http://youtu.be/ReC8ndoGJtM
project: https://yadi.sk/d/O7wnVe7_a2e5h

9

(2 replies, posted in General)

Yes, this can be done with triggers. Here is my example:
video    - http://youtu.be/MB483UITPdk
project  - https://yadi.sk/d/edF3-ZgPZiXDU

10

(30 replies, posted in Showcase)

thanks for the kind words, but actually there is not all good. I did this game in a hurry, so there are a lot of bad code. Almost half of the code can be reduced.

11

(3 replies, posted in General)

You can also interact with a single trigger.

function onSceneUpdate()
    if onEnterTrigger(triggers[1],player) then
         --...
    end
end

12

(3 replies, posted in General)

Not quite sure what you want to understand so I will write a detailed tutorial on the triggers.

1) Download the cube model. Make the following settings:
    invisible = true
    Physics (Box) = true
    ghost = true
http://savepic.net/6005548m.jpg

2) Create 3 copies of the cube (Ctrl + D). And rename them (trigger1, trigger2 and trigger3)
http://savepic.net/6009644m.jpg

3)Scripting. Create a main script and open it.
- get our triggers.

--you can do this:
triggers = {getObject("trigger1"),getObject("trigger2"),getObject("trigger3")}

--But better to do it through the loop.
triggers = {}
num_triggers = 3    --the number of triggers.
for i=1,num_triggers do
    triggers[i] = getObject("trigger"..i)
end
--it's the same thing, if done manually:
--triggers[1] = getObject("trigger1")
--triggers[2] = getObject("trigger2")
--triggers[3] = getObject("trigger3")

Now let's write a function entry trigger.

function onEnterTrigger(trigger,entity)
    if isCollisionBetween(trigger, entity) then --if collision
        return true
    end
end

Now, to verify create three cubes. Applied physics them and place them on the triggers. And create the camera.
http://savepic.net/5984044m.jpg

get these cubes.

cubes = {}
num_cubes = 3
for i=1,num_cubes do
    cubes[i] = getObject("cube"..i)
end

Let's do that in contact with triggers, cubes disappeared.

function onSceneUpdate()
    for i=1,#triggers do
        if onEnterTrigger(triggers[i],cubes[i]) then
            deactivate(cubes[i])
        end
    end
end

Result:
http://savepic.net/5987116m.jpg
http://savepic.net/5980972m.jpg

download project.

13

(3 replies, posted in General)

strange, but on my work PC Standart Render not working and Fixed Render works.

14

(30 replies, posted in Showcase)

Thank you!

Akira_san wrote:

It uses a lot of tables too...

I use OOP smile

15

(30 replies, posted in Showcase)

thank you, MaratisFan.

Sorry, try downloading now.
https://yadi.sk/d/1KMdiurOZ6LJ9

I did this by using triggers.
http://savepic.net/5987247m.jpg
https://yadi.sk/d/1KMdiurOZ6LJ9

18

(11 replies, posted in General)

it would be great!

19

(64 replies, posted in News)

I can try. But I have never done this before. XD

20

(2 replies, posted in General)

I never worked with source code, probably I will not cope smile . But I'll still try. Thanks for the reply.

21

(2 replies, posted in General)

I use setParent(object1,object2) to attach  object1 to object2. but I can detach these objects?
setParent(object1, 0) -- does not work!

22

(6 replies, posted in General)

I don't use behavior, I use Lua function.
I copied all three functions:

function getLength2d(vec)
    ...
end
function normalize2d(vec)
    ...
end
function lookAt(object, dir, rotSpeed)
    ...
end
obj1 = getObject("obj1")
obj2 = getObject("obj2")

function onSceneUpdate()
    dir = getPosition(obj2)
    lookAt(obj1, dir, 1)
end

nothing happens.

23

(6 replies, posted in General)

I have not function lookAt(). What am I doing wrong?
--onSceneUpdate()
dir = getPosition(object2)
lookAt(object1, dir, 1)

24

(6 replies, posted in General)

Thanks anael! This is exactly what I need.

25

(6 replies, posted in General)

hi all!
how to rotate the object in the direction of another entity only on the Y axis (lua)?