i think it is somehow possible to not flatten the ground for a building, which.. if i remember right, should be no problem if the building is not producing units. should look better with this turret.
although i have no idea about animation scripts, it looks to me, as if you should add more steps to the animation, as in: instead of moving the the leg by 30 degree every 30 frames, move it by 1 degree every frame (or something in-between).
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
cool video. I like the part where the strider gets killed by a wizard hat!
in upspring left and right is mirroed. left handed soldiers ftw
moving/turning works like Turn (piece, axis, targetAngle, speed) (if you leave out speed, it instantly snaps to the new angle/position.) If you turn two pieces, one by 45┬░ and the other by 90┬░ you must rotate the 90┬░ piece at double the speed so that they finish movement at the same time.
It is also helpful to make some movement in sub functions. allow Mister LavaLava to demonstrate:
Code:
function bounceThread () Signal(SIG_BOUNCE) SetSignalMask(SIG_BOUNCE) while (true) do bounceTo (10,20) Sleep (500) bounceTo (0,20) Sleep (500) end end
and bounceTo looks like this: notice the bounceSpeed*3 on the hip, it moves three times faster than one of the 3 leg-telescope-secments:
Code:
function bounceTo (bounceDist, bounceSpeed) Move (hip, y_axis, -bounceDist*3, bounceSpeed*3) for i=1,6 do Move (legs[i], y_axis, bounceDist, bounceSpeed) end WaitForMove (hip, y_axis) end
Joined: 24 Jan 2006, 21:12 Location: There is no god - and reality is his prophetess
and the headway is gone again: Im sorry, i worked the whole day on this animationscript.. and i still dont understand that concept of threats.. if i call a function, why does it have troubles executing it when sleep is inside
Its a freaking mess. And while i got some info on what to fix out of the old- line something errors, i dont get anything out of this stop not in a thread messages!
Of course stop is not in a a thread. The Engine determinates when the walk is done, doesen it?!
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
normally the script is executed line by line 1 do something 2 do this thing 3 do that thing ...
Now with threads you can make it run in multiple places at once. do all the things!
With StartThread you can "fork" the flow of the script: It continues where you called StartThread(wiggle) and it also continues in the function which name is given in the () of StartThread. See how it is different from normally calling a function like wiggle()?
All that signal stuff is basically just to prevent the same thread-function running multiple times because that can cause problems. Otherwise one instance of your walk() function might want to move the right leg forward but there is another instance running which wants to move it backward.
Joined: 24 Jan 2006, 21:12 Location: There is no god - and reality is his prophetess
Then why is it sometimes complaining that things i dont want in a thread- are not in in a thread.
For example, if i want walking to stop, its stop_moving() legs_down() while(true) do idle() end end
and suddenly all hell breaks loose. I fucking hate this. I wrote a 700 line animationscript, and not a single line in it works like i expected. 2 days wasted for near_no result - Understand kivi and co for not using spring. This is a inverted, shivering, spasming nightmare.
Joined: 24 Jan 2006, 21:12 Location: There is no god - and reality is his prophetess
Everything is stashed away safely in threads now..
Code:
000219] /give tiglil [f=0000219] Giving 1 tiglil to team 0 [f=0000329] stopped walking! [f=0000329] [string "scripts/tiglilscript.lua"]:718: attempt to call global 'legs_down' (a nil value) [f=0000329] stack traceback: [string "scripts/tiglilscript.lua"]:718: in function <[string "scripts/tiglilscript.lua"]:713> [f=0000452] stopped walking! [f=0000452] [string "scripts/tiglilscript.lua"]:718: attempt to call global 'legs_down' (a nil value) [f=0000452] stack traceback: [string "scripts/tiglilscript.lua"]:718: in function <[string "scripts/tiglilscript.lua"]:713> [f=0000509] stopped walking! [f=0000509] [string "scripts/tiglilscript.lua"]:718: attempt to call global 'legs_down' (a nil value) [f=0000509] stack traceback: [string "scripts/tiglilscript.lua"]:718: in function <[string "scripts/tiglilscript.lua"]:713> [f=0000591] stopped walking! [f=0000591] [string "scripts/tiglilscript.lua"]:718: attempt to call global 'legs_down' (a nil value) [f=0000591] stack traceback: [string "scripts/tiglilscript.lua"]:718: in function <[string "scripts/tiglilscript.lua"]:713> [f=0000673] stopped walking! [f=0000673] [string "scripts/tiglilscript.lua"]:718: attempt to call global 'legs_down' (a nil value) [f=0000673] stack traceback: [string "scripts/tiglilscript.lua"]:718: in function <[string "scripts/tiglilscript.lua"]:713> [f=0000696] stopped walking! [f=0000696] [string "scripts/tiglilscript.lua"]:718: attempt to call global 'legs_down' (a nil value) [f=0000696] stack traceback: [string "scripts/tiglilscript.lua"]:718: in function <[string "scripts/tiglilscript.lua"]:713> [f=0000900] stopped walking! [f=0000900] [string "scripts/tiglilscript.lua"]:718: attempt to call global 'legs_down' (a nil value) [f=0000900] stack traceback: [string "scripts/tiglilscript.lua"]:718: in function <[string "scripts/tiglilscript.lua"]:713> [f=0000949] User exited [f=0000949] Path cache hits 0 0% [f=0000949] Path cache hits 0 0% [f=0000949] Statistics for local connection: Received: 2131 bytes Sent: 9318 bytes
Any help appreciated - why is it all of the sudden wrong to call a function in a thread, that does nothing but reset the position.
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum