For BEW I've implemented BBCodes ([i], [b], and [color] tags) but that does not help you with standard AC. You can use <i> and <b> tags for italic and bold text, for anything fancier you have to use <span> tags with custom styling - but that's probably what you've already read a few pages back.Mortze wrote:Inquire if it would be useful to have in AC some (upper) text options like italic, bold, and colours for the text. I know, and somebody explained it here, that there is a way to do that but it involves code.
I'm just guessing here but if you have a single variable which is set to 10 at the start of the scene, and then on various responses you increase or decrease it by 2 (if you always modify it by two then why not simply modify it by just 1?) then what you want to achieve could probably be done by simply using the Choose() function. So instead of directly jumping to a page (by either specifying a href in AC or using GotoPage('page') in an onclick) you would add Choose('variable', 0, 'goodpage.htm', 'sceneend.htm') to the onclick field of the hotspot or response. This goes to 'goodpage.htm' if 'variable' is greater than 0, else it goes to 'sceneend.htm'. Maybe this will help you, maybe it won't. If it seems too complex then the question you should ask yourself is: do you really have to do it that way? Could it be done in a simpler way?Mortze wrote:2/ I'm looking for help concerning a function I have to code.
function badResponse()
{
varMinus("score", 2);
var score = readVar("score");
if (score == 0)
{
GotoPage("end.htm");
}
return false;
}
With Tlaero's badResponse()-way, you need to add hrefs as usual then add the badResponse() to the onclick fields of bad responses.Mortze wrote:I should add the function on the onclick field even if I put an href destination?
function badResponse(targetPage) {
varMinus("score", 2);
return Choose("score", 0, targetPage, "end.htm");
}
Return to The workshop of creators
Users browsing this forum: No registered users and 0 guests