Prince143 Posted September 21, 2014 Share Posted September 21, 2014 Is there a code for "Teleports a few metres away when attacked" If there is a code could someone give me the code to it ! GIMME GIMME ! Link to comment Share on other sites More sharing options...
Mobbstar Posted September 21, 2014 Share Posted September 21, 2014 "Writhe, Maxwells last Friend" has such a mechanic. I don't know how it works, but I'd guess somewhat like this:1) Get the players position2) Get walkable offset (I never got the hang of this part)optional: pre3) Put a dustcloud effect at the players location3) Transform player to new position Link to comment Share on other sites More sharing options...
Prince143 Posted September 21, 2014 Author Share Posted September 21, 2014 "Writhe, Maxwells last Friend" has such a mechanic. I don't know how it works, but I'd guess somewhat like this:1) Get the players position2) Get walkable offset (I never got the hang of this part)optional: pre3) Put a dustcloud effect at the players location3) Transform player to new position As you can see ... I know nothing at all in coding so it is impossible for me to understand those things xD Link to comment Share on other sites More sharing options...
Elipod Posted September 21, 2014 Share Posted September 21, 2014 Why do you need the code then? Link to comment Share on other sites More sharing options...
Prince143 Posted September 21, 2014 Author Share Posted September 21, 2014 Why do you need the code then? WELL YOU'RE ASKING ? OF COURSE FOR MY CHARACTER Link to comment Share on other sites More sharing options...
Elipod Posted September 21, 2014 Share Posted September 21, 2014 Didn't you just said you can't understand a thing? Link to comment Share on other sites More sharing options...
MidrealmDM Posted September 21, 2014 Share Posted September 21, 2014 WELL YOU'RE ASKING ? OF COURSE FOR MY CHARACTER It seems that you are asking someone to write the code for you and give it to you. P.S. If you don't know about coding how are you making a character? Link to comment Share on other sites More sharing options...
Heavenfall Posted September 21, 2014 Share Posted September 21, 2014 local function repetitionteleport(inst) local x2, y2, z2 = inst.Transform:GetWorldPosition() local x, y, z = inst.Transform:GetWorldPosition() x = x+math.random(-20, 20) z = z+math.random(-20, 20) inst.Transform:SetPosition(x,y,z) if not inst:IsOnValidGround() then inst.Transform:SetPosition(x2,y2,z2) repetitionteleport(inst) endendmake a listenforevent for that Link to comment Share on other sites More sharing options...
Prince143 Posted September 21, 2014 Author Share Posted September 21, 2014 Didn't you just said you can't understand a thing?It seems that you are asking someone to write the code for you and give it to you. P.S. If you don't know about coding how are you making a character? No that's not what I mean ... I am not making a character (that's impossible lol)I am just experimenting and having fun with those custom characters and I not intend to release it in public. Link to comment Share on other sites More sharing options...
Prince143 Posted September 21, 2014 Author Share Posted September 21, 2014 Oh and sorry for being LAZY . Link to comment Share on other sites More sharing options...
Rosten Posted September 21, 2014 Share Posted September 21, 2014 Learn Lua, I can't reccomend enough to anyone that they learn some kind of coding in their life, programming can be an extremely useful skill, both in the business world, and in the "I just wanna mess around with my games" world. Don't Starve is programmed in Lua (Partially in C++ if I remember correctly) so focus on learning that if you want to get into DS modding.Also OOP. Link to comment Share on other sites More sharing options...
Mobbstar Posted September 22, 2014 Share Posted September 22, 2014 I agree with Blazingice, Lua is a light and rather easy to understand programming language. That makes hobby-programming, especially in an enviroment like Don't Starve (which is built up in a put-it-together way, like those magneto-stick toys ) very easy and interesting. I wouldn't call it extremely useful, but understanding logical if-clauses, for instance, is useful in every field that has logic. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.