Terrantor!!! Wrote:I don't think as3 supports the charAt function. So the % thingy won't work,
Did you see my code and swf? I already got an example of this working (if you are talking about what I think you are)
Terrantor!!! Wrote:I don't think as3 supports the charAt function. So the % thingy won't work,
Terrantor!!! Wrote:Aww, darn. The only access I have to the site is through the iPhone which doesn't run flash. I cannot see or download ur demo.
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.text.TextField;
import flash.text.TextFieldType;
import flash.text.TextFormat;
/**
* ...
* @author Anonymouse
*/
public class Main extends Sprite
{
private var inTf : TextField; // input
private var outTf : TextField; // output
private var thesaurus : Object; //No clue but we'll find out.
public function Main():void //Main method or consturctor.
{
if (stage) init();//if the stage already exist, then just initalize the program
else addEventListener(Event.ADDED_TO_STAGE, init); //we add a eventlistener by adding a constant and a variable named init.
// init is a function that returns void but for some reason it's a variable.
}
private function init(e:Event = null) : void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
//add both the TextField to the Main Object. Input on top, Output on bottom.
addChild(inTf = new TextField());
addChild(outTf = new TextField());
//sets the default stats of the TextPanel
inTf.defaultTextFormat = new TextFormat("Verdana", 12);
inTf.width = 600;
inTf.height = 200;
inTf.type = TextFieldType.INPUT;//Because of this, it will accept input.
inTf.border = true;
outTf.defaultTextFormat = new TextFormat("Verdana", 12);
outTf.width = 600;
outTf.height = 200;
outTf.y = 400;
outTf.border = true;
thesaurus = { race : getRace, cock : describeCock }
inTf.text = "Try writing text here, including the tags %race and %cock."
inTf.addEventListener(Event.CHANGE, parseText);
}
private function getRace() : String
{
return "human";
}
private function describeCock() : String
{
var options : Vector.<String> = new < String > ["cock", "penis", "dick"];
return options[Math.floor(Math.random() * options.length)];
}
private function parseText(e : Event) : void
{
var text : String = inTf.text;
for (var s : String in thesaurus)
{
while (text.indexOf("%" + s) >= 0)
{
text = text.replace("%" + s, thesaurus[s].apply());
}
}
outTf.text = text;
}
}
}
var F = new function(...args) : void
{ /*code*/};
Aisy Wrote:but I'd like to help out with what I can w/r/t suggestions.
Aisy Wrote:@Anonymouse The character creator so far seems pretty neat, is it possible to add presets to it? Working with sliders can be great in terms of detail but casual players might just want to go with average or slightly above-average without worrying too much about numbers. It's trivial, but can help with accessibility.
I really like that idea. I mean obviously you want people to be able to customize their characters however they want, but I think it would be better if they had a base to start from and then they had to do in game stuff to change their character into what they want. If they can start with whatever they want, in game transformations are useless.Aisy Wrote:While I'm on this train of thought, what about something similar to Fallout, where you could get preset by choosing a specific race? You'd end up with a very cookie-cutter appearance like black hair/brown eyes/tan skin, but having the option gives something for people to work off on. It might seem a bit complex at this point, but definitely something to consider.
I really like the idea of a survival element, where you have to spend a proportion of your time scavenging for food and water.Aisy Wrote:What if we considered things like hunger or thirst to replace status modifiers, or make combat modifiers less involved?
Terrantor!!! Wrote:Ok well I like the way Bethesda does stats.
Strength
Stamina
Speed
Speech
Stealth
Intelligence
Seduction
Radioactivity
Pride
Psychic
Attributes
Fitness
IntelligenceStat
Stamina
Speed
Seduction
Psychic
RadioactivityFitness
Stamina
Speed
(Seduction += log(Fitness*10))/2Intelligence
Seduction/2
Psychic
Terrantor!!! Wrote:Armor based stats was done in monster hunter, really cool way and incentive to farm resources. Only problem was combining from different sets usually led to ur character looking mismatched and the stat bonuses not doing shit. But I figure if the armors activated perks like a switch then a threshold, this could be bypassed. And I mean it's the apocalypse, who cares if ur clothes match?
Users browsing this forum: No registered users