Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Paste this in server.js these may be difficult to add. You can ask me for some help*/
- // Spawn_on Death (optimised frag) you must know where to put this
- if (set.SPAWN_ON_DEATH != null) {
- this.spawnOnDeath = set.SPAWN_ON_DEATH;
- }
- //use ctrl + f and search 'Check for death' and put it under "if (this.isDead()) {"
- let _body = this;
- if (this.spawnOnDeath != null) {
- this.spawnOnDeath.forEach(function(i){
- for(let j = 0; j != i.N; ++j){
- let o = new Entity({x: _body.x + ran.irandomRange(-4, 4)
- ,y: _body.y + ran.irandomRange(-4, 4)
- });
- o.define(i.T);
- o.color = _body.color;
- o.team = _body.team;
- o.master = _body.master;
- if(i.VEL) {
- let a = Math.random() * 2 * Math.PI;
- o.velocity.x = Math.sin(a) * i.VEL;
- o.velocity.y = Math.cos(a) * i.VEL;
- }
- }
- });
- this.spawnOnDeath = null;
- }
- // Phase 2
- if (this.frag === 'snowflake') {
- let color = this.color
- let frag = this.frag
- let size = this.SIZE
- var random = ran.randomRange(-100, 100);
- if (random >= -25 && random <= 25) random *= 3.5
- random = Math.round(random);
- random /= 100;
- let o1 = new Entity({
- x: this.x,
- y: this.y
- })
- o1.define(Class.snowcore);
- o1.team = this.team;
- o1.name = this.name;
- }
- if (this.frag === 'corexplosion') {
- let color = this.color
- let frag = this.frag
- let size = this.SIZE
- var random = ran.randomRange(-100, 100);
- if (random >= -25 && random <= 25) random *= 3.5
- random = Math.round(random);
- random /= 100;
- let o1 = new Entity({
- x: this.x,
- y: this.y
- })
- o1.define(Class.corexplosion);
- o1.team = this.team;
- o1.name = this.name;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement