"all but one exception"

Got a cool idea that should be in R'n'D? Let's hear it!

Moderators: Flumminator, Zomis

Post Reply
User avatar
Lee Brewer
Posts: 78
Joined: Tue Jul 25, 2006 2:53 am

"all but one exception"

Post by Lee Brewer »

I am making shootable arrow. I want them to explode upon hitting eveything except themselves. Otherwise the shooting speed is limited to being slow b/c if the player accidentally hits the fire button twice quickly, the 2nd arrow blows up on the one already fired and the player is then killed.

One way I theorize to make rapid fire possible is to make group elements holding everything except the arrows and setting it so that when the arrow hits something in the group element, the change is registered and the arrow explodes.

Is there not a way to reverse this and make exceptions for elements?

Such as make an option of "Change except when hitting" with a box to enter the element that would be an exception.
Lee

WWII was fought against fascism, communism, and socialism - so what happened? "Sorry" to vets just does not cover it.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: "all but one exception"

Post by Holger »

May it be possible to define a special CE condition (a la "arrow hits arrow from behind") which would cause the second arrow to silently disappear (instead of exploding and killing the player)?
User avatar
Lee Brewer
Posts: 78
Joined: Tue Jul 25, 2006 2:53 am

Re: "all but one exception"

Post by Lee Brewer »

Yes, but this decreases the inventory so the player no linger know the number of shots they hae.

The complexity of this goes deeper.

I have three different colored enemies. I have three different colored arrows. Yellow kills yellow, green kills green, and purple kills purple.

Let me use Y, G, P for the color names.

At any one time, I have the level such that ammo can be collected in a sequence of Y,G,P, Y,G,P, and so on. Since there is no other way of letting a player know what is next in inventory, laying out the collectable arrows in this order lets the player mentally keep track of what color his next shot is. This way if he sees a yellow enemy is next, he has an idea of whether his arrow will take care of the enemy or not.

I also have a couple "stations" along the player's path where he can swap any color arrow for any other colored arrow. Let's say the player sees he has four enemies in line next, such as a Y,Y,G,Y. The player can go back to the ammo station, swap arrows to make sure his next firing order match that of the Y,Y,G,Y enemies; and then he can go clear his pathway of enemies since he knows his ammo colors of Y,Y,G,Y match the color of the lineup of the enemies.

So if, while firing, let's say the second Y arrow disappears, the entire arrow color sequence is messed up.

The player fires thinking he is firing his second Y arrow at the second Y enemy. Instead the player sees a G arrow is shot. The enemy kills him instead. In some of my levels, this can be a very frustrating way for the player to be killed.

The problem I am trying to work around here really is one of having repetitive shots to be as fast on the screen as need them to be. When I set the speed of the arrows to a slow enough setting the keyboard cannot accidentally register two or more presses of the fire key when I only intend one shot, the speed of the enemies is too great for the arrows. If I make the enemies slow enough to match, the game is a boring speed (maybe not for a little kid of 4 years old).
Lee

WWII was fought against fascism, communism, and socialism - so what happened? "Sorry" to vets just does not cover it.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: "all but one exception"

Post by Holger »

Yes, but this decreases the inventory [...]
You could re-add the removed arrow by using the following setting on the CE's "change" tab:

[x] [set inventor] [+ trigger] [ ]

or

[x] [set inventor] [+ action] [A] (with "A" being the arrow CE)
[...] so the player no linger know the number of shots they hae.
If knowing the inventory is an issue (or if it is important to know what comes next when dropping or throwing an item from the inventory), listing them in the panel may help. Please have a look at the attached minimalistic/test level set for a demonstration how this could be achieved using custom artwork.
Attachments
test_panel_graphics_1.zip
(2.21 KiB) Downloaded 267 times
User avatar
Lee Brewer
Posts: 78
Joined: Tue Jul 25, 2006 2:53 am

Re: "all but one exception"

Post by Lee Brewer »

Admittedly this solution is a but beyond my experience with R&D since there are a lot of named options in the pages I do not yet understand when programming CEs.

So I am assuming the fix you prescribe is set on the same page as the arrow is told to disappear.

I will check into this tomorrow and post results.


As far as the included zip file - this is great! I am sure I can backwards engineer it from your example, but where do I get a list of all the arguments/parameters available that you have used in the graphisinfo.conf file? I would like to know all the options available that I could use.
Lee

WWII was fought against fascism, communism, and socialism - so what happened? "Sorry" to vets just does not cover it.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: "all but one exception"

Post by Holger »

Admittedly this solution is a but beyond my experience with R&D since there are a lot of named options in the pages I do not yet understand when programming CEs.
You might want to have a look at the level sets of Alan Bond and Juergen Bonhagen for examples of clever CE configuration.
So I am assuming the fix you prescribe is set on the same page as the arrow is told to disappear.
Yes, it's all on the "change" page/tab.
I am sure I can backwards engineer it from your example, but where do I get a list of all the arguments/parameters available that you have used in the graphisinfo.conf file? I would like to know all the options available that I could use.
Just use

Code: Select all

./rocksndiamonds -e "print graphicsinfo.conf"
for all graphics config options. I've attached the output here, if you should use the Windows version of R'n'D (where it might be a bit tricky if one is not used to the command line).
Attachments
graphicsinfo-conf.txt
(460.5 KiB) Downloaded 270 times
Post Reply