Jump to content
Stray Fawn Community
  • 0

Hi Im new! Secondary activation keys?


unmog

Post

Alright, so it'd be great if thrusters had more than one activation button! But until then let me make a little diagram to better explain what I was wanting help with.

A>[] [] []<B
C>[] () []<D
B>[] [] []<A

So lets say we have a simple ship, with the drone core in the middle, arranged in a 3x3 block of parts with thrusters on two sides. In this example, if I press A I turn clockwise, if I press B I turn counter clock wise. If I press C I strafe to the right, if I press D I strafe to the left.

Im wanting a way that if I press C, I use all the thrusters on the left to strafe faster, and if I press D I use all the thrusters on the right. Now it'd be great if the thrusters had 2 activation options, then I could just add D as a secondary to the ones on the right and C as a secondary to the left ones. However I noticed we have a bunch of logic gates and sensors and things, just it sucks they're so big... but is there a simple way I could use those to accomplish what I was wanting?

While I'm thinking about it, it would be cool if we could attach a part to more than one other part. That way we can make more durable ship walls without wobble seams~ >.>

  • Like 1
Link to comment
Share on other sites

6 replies to this post

Recommended Posts

  • 0

The IF block is currently our solution to that.  Give your thrusters tags instead of keys - for example, strafe left, leftward CCW thrust, and leftward CW thrust.  (Clockwise and counter-clockwise.)

Now you can use if blocks so that when you hit 'A' to strafe, it activates both your left strafe, and the thrust toward the left that you'd also use for CW and CCW turning.

An object can also have BOTH a tag and a key, which also provides multiple activation criteria.

Be aware, there is a drawback; I'm sure you're already aware, but I'll mention it anyway.  You can only effectively use one kind of thrust at a time in this setup.  If you need to turn fast, you have to stop strafing, because your strafe includes thrusters that negate part of your turning force.  In many of these builds, if your turn left/right thrusters are forward and back, (tank controls,) you can't turn well while under thrust.

I'm personally a big fan of enabling things like this, but I think logic is the way to do it.  I think logic and sensors, making drones that can respond intelligently to your needs, is the core of Nimbatus's appeal.  I'm hoping, instead of modifying inputs this way, to see logic modified so that it isn't so awkward in construction.

  • Like 1
Link to comment
Share on other sites

  • 0

I agree with what @Lurkily wrote about tags. They permit, among other things, greater flexibility and an easier time remembering what goes where.

As for your craft, there indeed exist logic gates that allow for mapping two keys for one component. As far as I can tell, your craft will require a bare minimum of four of those gates, and since I do not want to spoil the fun, I will only reword your request:

Is it possible to make it so that thruster number 1 fires on pressing A, OR on pressing C? To which I answer: yes, it is possible. If you ever attended classes in logic, then you might want to write down each event ("thruster 1 fires"; "key A is pressed"; etc.) and see what each is equal to. If not, this will be your first self-taught lesson!

Solution, in white (select to see): be A, B, C, D the keys being pressed to respectively strafe right, turn right, strafe left, turn left; be T1, T2, T3, T4, T5, T6 the thrusters in clockwise order starting from upper left.

T2 (middle right) operates when strafing left. In terms of logic, T2 = C. In the game, you can simply set up T2 with C as input, because it should fire when C is pressed, no other condition.

T1 (upper right) operates when strafing left, or when turning left. If you press both C and D at once, thruster should still be operated; if you press any key other than C or D, thruster should remain still. In terms of logic, T1 = C + D = C OR D. In the game, it translates into an OR gate with C and D as inputs, and T1 as output.

Do the same for each thruster, and you're set. It should require four OR logic gates, and there exists no way to simplify it.

As for turning while strafing, it is not really a problem. The craft turns a little slowly, and with four more gates (I do not think you can go below that number) you can disable the culprit while turning. It... does turn fast, though.

Hope that helps!

  • Like 1
Link to comment
Share on other sites

  • 0

Thanks, I didn't even know about the tags! Im not sure why you guys were saying it would need 4 logic circuits tho... I did it with just 2 IF gates. Since you went into such detail tho I dont mind explaining what I did... tho I still wish the logic pieces were smaller... or maybe just a "brain box" that we can add that lets us do multiple of the current logic gates. I try to keep my ships pretty small and compact so far and they dont help things.

Anyway using my earlier example, I'll rename the parts to the actual keys I planned to use. I just used abcd as an example to keep it simple.

D>[] [] []<A
Q>[] () []<E
A>[] [] []<D

Basically I turn left and right with A and D, forward and back with W and S, and strafe with Q and E. So after enabling Tags [it wasn't for some reason, maybe it was off by default or I turned it off without know what it was] and using two if gates, I made the left thrusters have the tag SR and the right ones have the tag SL. One IF gate I set the input to E with an output of the SR tag, and the other if gate I set to Q with a SL tag.

Pretty simple really, I've never took lessons or anything but I have a knack for coding I guess so once I knew I could use tags and which gate to look for it didn't take any time. Still havent got any large shields or extra building parts tho, just gun upgrades, and theyre pretty powerful.

Still, it would be nice if the secondary option was available regardless tho. Like if the game let you decide to use a tag or a key for either of the two options, so I'll leave my suggestion there since I think it'd be a nice feature instead of a brainbox which would just be a part you could put logic things in. Why do the logic things have to be so big anyway?

Well, thanks again for pointing me in the right direction guys

  • Like 1
Link to comment
Share on other sites

  • 0

One if gate plus one per additional thruster grouping can activate say, both turn left and turn right thrusters to assist forward thrust. (If w, forward thrust, CCW forward thrust, and CW forward thrust, in this case.)  You'll need a few more to ensure that if you thrust forward, AND try to turn clockwise, that the counter-clockwise forward thrust cuts out.

Link to comment
Share on other sites

  • 0
3 hours ago, Lurkily said:

One if gate plus one per additional thruster grouping can activate say, both turn left and turn right thrusters to assist forward thrust. (If w, forward thrust, CCW forward thrust, and CW forward thrust, in this case.)  You'll need a few more to ensure that if you thrust forward, AND try to turn clockwise, that the counter-clockwise forward thrust cuts out.

I dunno... seems to be working pretty well for me. You can try it tho and see what ya think?

 

Strafe Logic Example.drn

Link to comment
Share on other sites

  • 0
5 hours ago, unmog said:

Basically I turn left and right with A and D, forward and back with W and S, and strafe with Q and E. So after enabling Tags [it wasn't for some reason, maybe it was off by default or I turned it off without know what it was] and using two if gates, I made the left thrusters have the tag SR and the right ones have the tag SL. One IF gate I set the input to E with an output of the SR tag, and the other if gate I set to Q with a SL tag.

I completely failed to see that one. I for some reason thought exclusively without tags and missed the target completely.

Here is to my recognising utter defeat. bow down in submission

As for logic gates, I suppose they are 2x1 units so you can recognise them at a quick glance in case you need to change the behaviour of a craft. They would be rather difficult to tell apart were they smaller, and I for one prefer not having to write down every thing (which would be about the only way I could handle this, really).

 

Welcome on board.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...