Tic Tac 2 Posted May 16, 2015 Author Share Posted May 16, 2015 I have an item type that calls custom scripts, and i'd like to make a bomb script that works like this:1. When script is first called, places a 32x32 sprite of /items/100.png on the ground where you were standing, calls a sound effect /sounds/example.wav to everyone in the map.2. A timer of three seconds passes3. After three seconds have passed, remove bomb sprite from map, call animation /animations/10.png and deal 20 damage to everybody in the 3x3 radius, the bomb being in the middle. Also call a sound effect /sounds/boom.wav Link to comment Share on other sites More sharing options...
DarkDino Posted May 28, 2015 Share Posted May 28, 2015 Do you need to add on Map Data a new var like Bombs or maybe you can use the TempPlayer Bombs, I think the tempplayer are more efficient:1\. Make a TempPlayer var .Bomb with a Bomb REC. This BombRec need this values Active,X,Y,Pic,Sound,Spell.2\. When you use a BOMB Skill or another the client send a packet, in the server do you need to make a sub to create a BOMB like the Projectile System:' I give a little example without a TIMER because now are the 3:00am on my country, lol.```CreateBomb(Byval Index)bombType = TempPlayer(index).BombTypeWith TempPlayer(index).Bomb.x = getplayerx(index).y = getplayery(index).active = true .pic = bombType ' the image of bomb.Sound = "bomb.wav" ' the sound k-boom.Spell = 1 ' This value is the Spell AOE of Explosion Radius do you need create this beforeEnd WithSendBombToMap(getplayermap(index), index) ' This sub send the player bomb to people on mapEnd Sub-------SendBombToMap(byval mapnum as long, byval index as long) ' Do you need the index because need show the BOMB valuesWith TempPlayer(index).Bombbuffer.writelong(.x)buffer.writelong(.y)buffer.writelong(.pic)buffer.writelong(.sound)end withSendDataToMap(mapnum,data.lmao)end sub' And you need make a Handle on client and a DrawPlayerBomb(index, bombpicture). Here you need draw the bomb and explosions. Don't miss the PlaySound(SoundBomb) receive.```When the bomb exploit do you need to make a ClearPlayerBomb to clean the Data of Client and Server. Good luck ;) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now