ID:178752
Apr 9 2002, 12:11 pm
|
|
mob icon = 'player.dmi' verb say(T as text) world << "[src]:[T]" obj proc/Trigger(O) // Override this proc for objs that // do things when stepped on. By default // do nothing. turf Entered(O) // called when O enters the turf for(var/obj/Obj in src.contents) Obj.Trigger(O) // Obj was Trigger()ed by O ..() // allow other Entered() procs to happen obj/beam icon = 'beam.dmi' density = 0 var distance = 6 next_state Trigger(O) // you'll want to apply damage to O here if(ismob(O)) // make sure O is a mob var/mob/M = O // so we can use mob variables with M //world << "[M] is hit by a spectra beam!" M.icon_state = num2text(rand(1,6)) New(Loc) ..() for(var/mob/M in Loc) // look for mobs when the beam starts src.Trigger(M) // this beam hit mob M spawn(20) del(src) // remove the beam after 2 seconds proc/fireloop() distance-- if(distance>0) var/turf/newloc = get_step(src,dir) // one step ahead if(newloc && !newloc.density) // if the spot is there and not dense var/obj/beam/B = new(newloc) // create a beam at newloc B.icon_state = next_state B.dir = dir B.next_state = next_state B.distance = distance spawn() B.fireloop() // remove the spawn if you want it instantaneous mob/verb/Plasma_Ray() // this section prevents diagonal beams. Diagonals require fancy // icon states I'm too lazy to draw :P switch(dir) if(NORTHEAST) dir = NORTH if(NORTHWEST) dir = WEST if(SOUTHEAST) dir = EAST if(SOUTHWEST) dir = SOUTH var/turf/newloc = get_step(src,dir) var/obj/beam/B = new(newloc) B.dir = dir B.icon_state = "middle start" B.next_state = "middle" spawn() B.fireloop() newloc = get_step(src,turn(dir,45)) B = new(newloc) B.dir = dir B.icon_state = "ccw start" B.next_state = "ccw" spawn() B.fireloop() newloc = get_step(src,turn(dir,-45)) B = new(newloc) B.dir = dir B.icon_state = "cw start" B.next_state = "cw" spawn() B.fireloop() //how do i make it when you enter the turf it dels the player who entered it? |
Apr 9 2002, 12:17 pm
|
|
Like this:
|
In response to Foomer
|
|
um. that ode sends a line of plasma out into space.. but when it hits a player it does nothing.. i want it when it hits a player it deletes them! heres the code:
mob icon = 'player.dmi' verb say(T as text) world << "[src]:[T]" obj proc/Trigger(O) // Override this proc for objs that // do things when stepped on. By default // do nothing. turf Entered(O) // called when O enters the turf for(var/obj/Obj in src.contents) Obj.Trigger(O) // Obj was Trigger()ed by O ..() // allow other Entered() procs to happen obj/beam icon = 'beam.dmi' density = 0 var distance = 6 next_state Trigger(O) // you'll want to apply damage to O here if(ismob(O)) // make sure O is a mob var/mob/M = O // so we can use mob variables with M world << "[M] is hit by Plasma ray!!" New(Loc) ..() for(var/mob/M in Loc) // look for mobs when the beam starts src.Trigger(M) // this beam hit mob M spawn(20) del(src) // remove the beam after 2 seconds proc/fireloop() distance-- if(distance>0) var/turf/newloc = get_step(src,dir) // one step ahead if(newloc && !newloc.density) // if the spot is there and not dense var/obj/beam/B = new(newloc) // create a beam at newloc B.icon_state = next_state B.dir = dir B.next_state = next_state B.distance = distance spawn() B.fireloop() // remove the spawn if you want it instantaneous mob/verb/Plasma_Ray() // this section prevents diagonal beams. Diagonals require fancy // icon states I'm too lazy to draw :P switch(dir) if(NORTHEAST) dir = NORTH if(NORTHWEST) dir = WEST if(SOUTHEAST) dir = EAST if(SOUTHWEST) dir = SOUTH var/turf/newloc = get_step(src,dir) var/obj/beam/B = new(newloc) B.dir = dir B.icon_state = "middle start" B.next_state = "middle" spawn() B.fireloop() newloc = get_step(src,turn(dir,45)) B = new(newloc) B.dir = dir B.icon_state = "ccw start" B.next_state = "ccw" spawn() B.fireloop() newloc = get_step(src,turn(dir,-45)) B = new(newloc) B.dir = dir B.icon_state = "cw start" B.next_state = "cw" spawn() B.fireloop() |
In response to ShadowSiientx
|
|
You don't need to keep posting the code over and over.
Just make the plasma thingy delete whatever it bumps, if whatever it bumps is a mob. obj/plasma_thingy |
In response to Foomer
|
|
...,
|
In response to Foomer
|
|
foomer join "star traders " in the hub and hit plasma ray. then try to run into it!
|
In response to ShadowSiientx
|
|
when u ran into it.. did it del you.. nope!
|
In response to ShadowSiientx
|
|
ShadowSiientx wrote:
foomer join "star traders " in the hub and hit plasma ray. then try to run into it! Even if imitation is the greatest flattery, that's just plain obscene... no offense, but when someone makes an ORIGINAL game, it makes it that much worse to make a spinoff unless you get the author's permission. That's not the same as taking similar ideas, adding new ones and improvements, and making your own game. But, in that case, you darned well better have your own name, graphics, dialogue, and music. =P (Let's put it from a gamer's perspective: if you're going to make a game that's exactly the same, why would people play your game instead of the original?) |
In response to Spuzzum
|
|
... fine.. mister pro... I am gonna delete it.. goodbye stupid Lil game.. Nothing like a pro that ruins yer games.. Ljr has even played my games.. e said nothing.. and if he doesn't want me to make a space Kinda game.. then he should of told me! and has he/ No!.. but no..i am gonna delete my game.. and say forget it.
|
In response to ShadowSiientx
|
|
ShadowSiientx wrote:
when u ran into it.. did it del you.. nope! Notice the code Foomer posted says nothing about you bumping the ray, but instead is for the ray bumping you? They're two completely different concepts; he coded for one, not the other. As for your original question why the player isn't deleted when hit by a ray: You didn't put in any code to delete them--only to say they were hit. Just adding the line del(M) to the proc that says the player is hit ought to do the trick just fine. The only reason it never deletes the player is that you never told it to. Lummox JR |
In response to ShadowSiientx
|
|
ShadowSiientx wrote:
... fine.. mister pro... I am gonna delete it.. goodbye stupid Lil game.. Nothing like a pro that ruins yer games.. Ljr has even played my games.. e said nothing.. and if he doesn't want me to make a space Kinda game.. then he should of told me! and has he/ No!.. but no..i am gonna delete my game.. and say forget it. That's kind of different from making a game with the exact name name, now, isn't it? If you want to do a space trading game, that's dandy; I'd even encourage it. But don't call it the same thing. Lummox JR |
In response to ShadowSiientx
|
|
There's no reason for anyone to tell you to stop, they're just telling you that making a game that's exactly like someone elses game is basically pointless. (Unless your sole purpose is to give yourself admin commands and boss around visitors, like all the DBZ games do.)
If you're going to spend your time and energy on something, you're better off spending it on something that you can take all the credit for, instead of putting a lot of effort into something that people will deem "a ripoff". Though, as Spuzzum pointed out, if you add enough to the game, it will be deemed "an improvement" on the other game, rather than a ripoff. |
In response to Spuzzum
|
|
Spuzzum wrote:
ShadowSiientx wrote: ... fine.. mister pro... I am gonna delete it.. goodbye stupid Lil game.. Nothing like a pro that ruins yer games.. Ljr has even played my games.. e said nothing.. and if he doesn't want me to make a space Kinda game.. then he should of told me! and has he/ No!.. but no..i am gonna delete my game.. and say forget it. And i meant space wars.. not star traders.. that day! it was a typo!!!!! |
In response to ShadowSiientx
|
|
And i meant space wars.. not star traders.. that day! it was a typo!!!!! There's nothing wrong if the name isn't the same. I'll admit that my post was a little hostile, but please understand that I'm not trying to discourage you from anything. If your game is the same, don't make it. But, if it is different, that's great. |