0 votes
by (880 points)
Question1) I cant find where i had this posted but how do i have the buttons going from left to right

[BUTTON][BUTTON[BUTTON]

instead from top to bottom like this?

[BUTTON]

[BUTTON]

[BUTTON]

question 2) How do i check to see if either two, one and a none or 2 nones were selected?I have it where a player is able to pick two perks if they select a specific background but how do i check to see if he chose 2 perks, one perk and a None, or just hit none . I know i will need an if but i made the perks also link to another passage.

question 3) how would multiattacks and group attacks work?

2 Answers

0 votes
by (8.9k points)
We need to see your existing code before we can suggest changes.
0 votes
by (159k points)

> ...going from left to right ... instead from top to bottom like this?

By default each line-break you add to the content of a passage gets automatically converted to a HTML br element, and (without seeing your code) I'm guessing that this effect is what is causing your 'buttons' to appear on different lines.

So if your code looks something like the following...

<<button "Option 1">>
	...do something...
<</button>>
<<button "Option 2">>
	...do something...
<</button>>
<<button "Option 3">>
	...do something...
<</button>>

... then the generated HTML buttons would appear 'top to bottom' on the page.

However if you used Line Continuations to suppress some of the line-breaks like so...

<<button "Option 1">>
	...do something...
<</button>>\
<<button "Option 2">>
	...do something...
<</button>>\
<<button "Option 3">>
	...do something...
<</button>>

...then the generated buttons would appear 'left to right'.

You could also use the <<nobr>> macro to achieve a similar visual result..

<<nobr>>
	<<button "Option 1">>
		...do something...
	<</button>>
	<<button "Option 2">>
		...do something...
	<</button>>
	<<button "Option 3">>
		...do something...
	<</button>>
<</nobr>>

 

by (880 points)
<span title="Camille's child will be human like Andrew, Nothing is  used."><<button "Human" "HumanInfo">><</button>></span>

<span title="Camille's child will be elegant and beautiful, like th elves"><<button "Elf" "ElfInfo">><</button>></span>

<span title="Camille's child will be mean, green and a fighting machine."><<button "Orc" "OrcInfo">><</button>></span>

<span title="Camille's child will be more like her, loyal, fluffy and caring"><<button "Canid" "CanidInfo">><</button>></span>

<span title="Camille's child will be a insane hyena"><<button "Hyaenidae" "HyaenInfo">><</button>></span>

My buttons look like the above.



This is what the player chooses as a background

<span title="This background allows you to pick two perks"><<button "DBlePick" "part6">>
<<set $playerBackground= "DblePick">>
<<set $playertrait="true">>
<<set $playerpicks= 2>>
<</button>></span>


These are the perks
<span title="This perk allows the player to hit twice against an enemy."><<button "Double Attack" "part6">>
<<set $attackTwice= "true">>
<<set $attack1 = "$playersweaponAttack"+ "$playerBonus">>
<<set $attack2 = "$playersweaponAttack"+ "$playerBonus"/2(maybe get this to round up or down?>>
<</button>></span>

<span title="Gain Extra stamina for your attacks to use."><<button "Stamina Pack" "part6">>
<<set $playerStamina= "$constitution" +5>>
<</button>></span>

<span title="None, you don't want the above perks"><<button "None" "part6">><</button>></span>

<span title="You gain a an edge in defense"><<button "Protector" "part6">>
<<set $playerAC= "$playerAC" + 5>>
<</button>></span>

<span title="You swing wide, cleaving all enemies"><<button "Cleave" "part6">>
<<If $enemy number >= 1>>
<<set $damage= $weaponDamage>>
??????
<</if>>
<</button>></span>

<<if $playerBackground="DblePick">>

<</if>>
 

 

by (159k points)

I have already explained in my previous comment how to use Line Continuations or <<nobr>> macros to suppress unwanted line-breaks from appearing in the visual output of your Passage.

I suggest you try using <<nobr>> macros in your passages and see what happens.

by (880 points)

commented 2 days ago by greyelf (105k points)

I have already explained in my previous comment how to use Line Continuations or <<nobr>> macros to suppress unwanted line-breaks from appearing in the visual output of your Passage.

I suggest you try using <<nobr>> macros in your passages and see what happens.

Yeah, i coudnt find it and i star all of my questions, ill try to make my question names more reflective instead of just naming them questions

answered 3 days ago by Charlie (11.4k points)

We need to see your existing code before we can suggest changes.

Posted, im thinking the problem is that im linking them to another passage so ill try an remove the passage and see what happens. Also how would i do group or singe target multiple hits ?

...