mob RandTeleport() // Random Teleport proc var/list/L = list() // Define L to be an empty list for(var/turf/T in world) // loop through all turfs in world L += T // Add each turf to the list src.Move(pick(L)) // Teleport to a random turf.
I'm not entirely sure what you mean but this is one way that I'd try to do it. This is the base for my spawning proc, modified it can teleport you within any region you wish.
> mob > RandTeleport() // Random Teleport proc > var/list/L = list() // Define L to be an empty list > for(var/turf/T in world) // loop through all turfs in world > L += T // Add each turf to the list > src.Move(pick(L)) // Teleport to a random turf. >
I'm not entirely sure what you mean but this is one way that I'd try to do it. This is the base for my spawning proc, modified it can teleport you within any region you wish.
this isnt even close to what i mean... i mean
<dm>
proc/TornamentStartProc()
var/WarMap=pick("1","2","3","4")
var/MaxX
var/MaxY
var/MinX
var/MinY
switch(WarMap)
if(1)
MaxX=80;MaxY=80;MinX=20;MinY=20
if(2)
MaxX=180;MaxY=80;MinX=120;MinY=20
if(3)
MaxX=80;MaxY=180;MinX=20;MinY=120
if(4)
MaxX=180;MaxY=180;MinX=120;MinY=120
for(var/mob/M in TornamentEntries)
M.loc=locate(rand(MinX,MaxX),rand(MinY,MaxY),13)
M.TornamentOn=1
world<<"<font color=green>Server Info:</font> The Tornament has started on Map [WarMap]!"
global.TornamentStart=1
global.TornamentKillsNeeded=(global.InTornament*2)
No example for you. You can figure this one out, it's very simple. Here's your answer in the form of a hint.
"1" != 1
Nice way to be one of the rather useless people on BYOND, guess ill wait for Gakumerasara to get on or for someone else to actually decide to HELP instead of say whats wrong.
No example for you. You can figure this one out, it's very simple. Here's your answer in the form of a hint.
"1" != 1
Nice way to be one of the rather useless people on BYOND, guess ill wait for Gakumerasara to get on or for someone else to actually decide to HELP instead of say whats wrong.
If all you want is someone to write code for you, I suggest you hire a programmer.
Lugia has explained what is wrong quite adequately. You will learn by working to solve a problem. You will not learn by copy-pasting.
I will further demonstrate Lugia's point, in DM:
var/a = "1" switch(a) if(1) world << "Rabbits" if("1") world << "Goats"
No example for you. You can figure this one out, it's very simple. Here's your answer in the form of a hint.
"1" != 1
Nice way to be one of the rather useless people on BYOND, guess ill wait for Gakumerasara to get on or for someone else to actually decide to HELP instead of say whats wrong.
If all you want is someone to write code for you, I suggest you hire a programmer.
Lugia has explained what is wrong quite adequately. You will learn by working to solve a problem. You will not learn by copy-pasting.
I will further demonstrate Lugia's point, in DM:
> var/a = "1" > switch(a) > if(1) > world << "Rabbits" > if("1") > world << "Goats" > > //The output will be Goats >
i wasnt asking for someone to write code i was asking for what you did, AKA, an example so i can SEE what ive doen wrong, not an explanation of what i did that leaves me clueless.
i wasnt asking for someone to write code i was asking for what you did, AKA, an example so i can SEE what ive doen wrong, not an explanation of what i did that leaves me clueless.
Clearly by posting in reply to your thread, Lugia's only intention is to help you. If you didn't understand his example of what you were doing wrong, you should probably have asked for further clarification instead of being rude.
Lugia319 wrote:
"1" != 1
Is a notation that would be familiar to many programmers. It says that the string 1 is-not-equal to the number 1.
I'm not entirely sure what you mean but this is one way that I'd try to do it. This is the base for my spawning proc, modified it can teleport you within any region you wish.