Something I've been playing with for the last few days. Just an experiment, not a full game.
Setup: You have a player clone surrounded by breakables and objects, like so:
Whenever the player shoots, the player clone shoots as well. This destroys one of the breakable walls; one of the objects detects this, replaces the breakable wall, and sends out the message that the player has fired a shot north, or whatever.
Idea: Add two objects to the board, a giver and a taker. The giver #gives 1 ammo every cycle, and the taker #takes one ammo every cycle. There is no net change -- the cycle begins and ends with the player having 0 ammo.
However, there is a brief period when ammo is 1. So we get clever with the order of the stat list, and we create the giver first, then the player clone, then the taker. The result is that the player has no ammo, yet the player clone does.
As a result, the user can press Shift+direction, and the clone-breakable-detector assembly will detect it, but the player will not emit a bullet. Could be useful for designing an engine -- the download has an example where pressing Shift+direction does not shoot, but instead chooses a weapon.
Intercepting Shift+direction keystrokes
Moderators: Commodore, Zenith Nadir
- Quantum P.
- Level 17 Accordion Thief
- Posts: 1433
- Joined: Fri Sep 12, 2003 1:41 am
- Location: Edmonds, WA
- Contact:
- Quantum P.
- Level 17 Accordion Thief
- Posts: 1433
- Joined: Fri Sep 12, 2003 1:41 am
- Location: Edmonds, WA
- Contact:
The am-I-next-to-an-explosion technique required some fiddling, but it came out nice. Sometimes it triggers accidentally if you have a bunch of enemies bumping into each other, but two #if blocked statements does a surprisingly accurate job.
Most of the accidental triggers are hard to notice anyway, since stuff blows up where enemies tend to congregate. But every now and then you can see someone die who wasn't exactly adjacent to the explosion.
Most of the accidental triggers are hard to notice anyway, since stuff blows up where enemies tend to congregate. But every now and then you can see someone die who wasn't exactly adjacent to the explosion.
I noticed it because I did a similar thing using a slime for a explosion in EFCW, but my detection was simply to check if the enemy was completely surrounded, which of course also threw some false positives and made the explosions generally not very effective unless in a closed space.
*POW* *CLANK* *PING*