i already read this and try to implement the code made by skovacs1, but still couldnt come into anything, oh man, i’m really terrible on code…
(i found out the thread is alrdy on 2010, and i read it somewhere isnt it better to ask new one ? sorry if i’m wrong or “repost”-ing)
please can someone explain this to me? i made some project, the system is fighting-battle-turn that needs the object to move towards enemies, attacking and back to its start position…
i used this and still can’t figured out how it goes…
and also, could this done inside if(GUI.Button(Rect(50,300,70,30),“Attack 1”)) ??
so when i press the button, the object will move…
thanks before.
i still dont get how to do it.. so i should add in update and place it on the object i want to move? transform.position += new Vector3(1,0,0); yield WaitForSeconds (2); transform.position += new Vector3(-1,0,0); and how do i connect it by pressing a button? because as far as i know, i only understand how to execute an instruction by clicking button, using if(GUI.Button()){-statement-} thanks for the reply thou, made me know about yield :)
– Rgalaxy