Jump to content
MakeWebGames

Attack system


galdikas

Recommended Posts

Ok.. Will gonna attempt to have a go at coding attacvking system.

So I am now trying to come up with a way to make sure that if someone is in attack. so that he wont be able to browse any other page without losing an attack.

So if i set a session variable in attacking:

$_SESSION['attack']=1;

but do not declare this in any other page.

And then something like that'

if(isset($_SESSION['attack']))

{

battlecode goes here

}

else

$_SESSION['attack']=1;

So if someone visits another page while in attack... will this variable get destroyed???

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...