ID:149884
 
I'm makeing a ff7 game a need a party code can someone help
ZARZAK wrote:
I'm makeing a ff7 game a need a party code can someone help

This is untested, but it should be pretty close.

var/partyGuestCount

mob/Login()
. = ..()
partyGuestCount = 0
for(var/mob/M in world)
if(M.client) ++partyGuestCount

src << "Welcome to the ff7 party! There are currently [partyGuestCount] guest\s attending the party!"

src.overlays += 'party_hat.dmi'
src << sound('party_noisemaker.wav')
In response to Nadrew
I need help so it works in combat
look up
group (mob)

in the reference, its a built in list variable for all mobs, and the list can only contain mobs. You can utilize this built-in feature to do things with the group.

here are some examples

mob
verb
AddMember(mob/M as mob in oview())
src.group += M
RemoveMember(mob/M as mob in src.group)
src.group -= M
SpeakToGroup(T as text)
src.group << "[src.name]: [T]"//only group members see this
GoToGroupMember(mob/M as mob in src.group)
src.loc = locate(M.x,M.y,M.z)
SendGroupMemberToYou(mob/M as mob in src.group)
M.loc = locate(src.x,src.y,src.z)

and so on and so on

the above code you see would actually be the master of the group. As when , lets say, You are added to my gruop, i am not added to your group. Meaning only the master mob has the entire gruop list.

If you want, you can make all mobs add each other to each other's group, which i do recommend as you could get into some tuff situations(players wanting to stray from the gruop for a little while, but still wanting to have contact with the group)

FIREking