Spike
icon = 'Turfs2.dmi'
icon_state = "Spike"
name = "Spikes"
density = 1
Bumped(mob/m)
if(istype(m) && m.client) //I don't know if you want
m.loc = locate(4,98,2)
ID:272333
Jun 9 2008, 7:17 am
|
|
Can anyone help me out, I'm trying to add spikes to my game that right when you touch them you get killed, I tried and ending up have it so I have to bump into them to die. But if I don't move while standing on one nothing happens.
|
Jun 9 2008, 7:22 am
|
|
If the spikes are a turf, override Entered() to run your kill thing.
|
In response to Darkmag1c1an11
|
|
Spike Doesn't work. |
In response to Element Hero creator
|
|
Entered() won't get called because you have your density set to 1.
|
In response to Volte
|
|
Oh, that was my bad, but now I go right through the spikes.
Spike |
You can change your gravity to pull a mob down an extra time after they reach a dense tile. By the way, add anchors to your skin controls.
|
In response to Jeff8500
|
|
How do you know about my skin file?
|
In response to Element Hero creator
|
|
Played your SSB game. It needs double jumping, all 4 special attacks, and anchors in the skin :P. I hate it when I can't maximize a window because of my laptop's widescreen resolution.
|
In response to Jeff8500
|
|
Oh, I was planning on adding a double jump but it became kind a hard to add and I already added adventure stages that are kinda hard to beat with a normal jump, adding a double jump with make it way too easy, and my game isn't exactly smash bros, its basically a brawl between different characters, smash bros just came to my mind when making the game. Oh and how do I add anchors?
|
In response to Element Hero creator
|
|
:D Got it working, just like you said, I just changed the gravity code a bit.
|
In response to Element Hero creator
|
|
It's in the control parameters when editing a skin. Maybe you should read Lummox's Dream Makers article on skins?
Here's how I do it though: Hold CTRL and click every param in the window. Press the auto anchor button in the layout controls menu (it's a little anchor icon). It's not the best way (you could create your own anchors for everything), but I just go with the easier way personally. With anchors, you could make your window small enough for people with low resolution monitors, but big enough for people with massive monitors. Without them, resizing the window doesn't work very well. |
In response to Jeff8500
|
|
There, I set anchors, can you come on my game if it's working good? If yes tell me when your ready because I wanna close the connection as soon as you login so that no one else logs in.
|
In response to Element Hero creator
|
|
Ok, I'll check it out. I recommend using macros as much as possible, because BYOND 4.0 could handle a game like yours no problem.
|