Nuketf
|
  |
| Joined: 28 Oct 2011 |
| Total Posts: 95 |
|
|
| 20 Oct 2014 06:27 PM |
Hi there, I was trying to make a script but I'm not understanding some of the steps I need to do. Can any of you help me out? Thanks!
What i want is when the player touch the Zombie humanoid the Player is transported to ( X Y Z ) like...(5, 7, 3,) then the zombie is teleported to ( X Y Z ) the zombie can move untill wait(5) is over then it goes back to X Y Z then the player can move untill wait(5) is over then it goes to X Y Z and it loops.
When one of them die they get reset to normal back at where they started befor the battle(I'm attempting a turn based game) I'm fairly new to scripting and need this to loop as well (I need a bit of help with loops).
If anyone is willing to give me some pointers / guidance that would be greatly appreciated.
My script idea (i know...its probably 100% wrong)
When player touches Zombie Zombie player =new (player X Y Z ) (Zombie Z Y X)
Then. Zombie walkspeed=0 Player walkspeed=12
wait(5) Player new position=( X Y Z) walkspeed = 0
Zombie walkspeed = 12 wait (5) Zombie new position = ( X Y Z ) walkspeed = 0
*loop that some how untill..*
Zombie health = 0 player new position = ( where the player was befor the battle started)
|
|
|
| Report Abuse |
|
|
Nuketf
|
  |
| Joined: 28 Oct 2011 |
| Total Posts: 95 |
|
| |
|
Geomaster
|
  |
| Joined: 05 Jul 2008 |
| Total Posts: 1480 |
|
|
| 20 Oct 2014 08:16 PM |
A turn-based game isn't really something you should attempt if you're new...
Regardless, you would generally want to set two positions:
Where the zombie stands while it's not his turn Where the player stands when it's not his turn
To make that easier, you could just use two invisible parts and then move each one back to the position of those parts. |
|
|
| Report Abuse |
|
|
Nuketf
|
  |
| Joined: 28 Oct 2011 |
| Total Posts: 95 |
|
|
| 20 Oct 2014 08:19 PM |
so...how would i go about doing that? :P something like...
when player.touch.Humnoid.Zombie. Player Goto ("Spot 1") Zombie GoTo ("Spot 2") |
|
|
| Report Abuse |
|
|
Nuketf
|
  |
| Joined: 28 Oct 2011 |
| Total Posts: 95 |
|
| |
|
|
| 21 Oct 2014 08:07 AM |
| If you want a turn based game then you need a script or two that will operate the turns game logic itself... |
|
|
| Report Abuse |
|
|
Nuketf
|
  |
| Joined: 28 Oct 2011 |
| Total Posts: 95 |
|
|
| 21 Oct 2014 08:12 AM |
can't i have a script in the zombie ai that teleports player to airea1 and zombie to area2 then zombie walkspeed = 12
wait(5)
zombie goto airea2
walkspeed= 0
player walkspeed = 12
wait(5)
player goto area1
player walkspeed = 0
and it loops untill one is dead then the script is removed |
|
|
| Report Abuse |
|
|
|
| 21 Oct 2014 08:30 AM |
well i never was thinking of turn based stuff and my amount of practice with ai is nearly 0 sooo gl looking for help :| |
|
|
| Report Abuse |
|
|
Nuketf
|
  |
| Joined: 28 Oct 2011 |
| Total Posts: 95 |
|
|
| 21 Oct 2014 08:32 AM |
well...if you look at my first idea for the script there is noting editing the AI just walk speed
When player touches Zombie Zombie player =newposition (player X Y Z ) (Zombie Z Y X)
Then. Zombie walkspeed=0 Player walkspeed=12
wait(5) Player new position=( X Y Z) walkspeed = 0
Zombie walkspeed = 12 wait (5) Zombie new position = ( X Y Z ) walkspeed = 0
loop |
|
|
| Report Abuse |
|
|
Nuketf
|
  |
| Joined: 28 Oct 2011 |
| Total Posts: 95 |
|
| |
|
|
| 23 Oct 2014 11:26 AM |
| Ummmm.................. Am I meant to work with the script you posted or? |
|
|
| Report Abuse |
|
|
Nuketf
|
  |
| Joined: 28 Oct 2011 |
| Total Posts: 95 |
|
|
| 23 Oct 2014 01:01 PM |
| have it become working i know its probly 100% wrong but that is what i want the script to do |
|
|
| Report Abuse |
|
|
| |
|