Aligning images in choicescript


#1

I’m trying to insert multiple images into my stat screen and want to align them so that they appear to be one image rather than multiple images, but right now they have a space between them that just doesn’t work for me. Also, I only seem to be able to align them to center, because if I try to align them left or right they go all wonky. Here’s what they look like aligned center:

https://dl.dropbox.com/u/2587272/Capture.JPG

And here’s what they look like aligned right:

https://dl.dropbox.com/u/2587272/Capture2.JPG

Any ideas on how to fix this?

Also, how do I post screenshots and do other formatting in the forum?


#2

You can’t fix it without editing the core .js and/or style.css - Meaning CoG may then refuse to host your game (as it’s modified or “hacked” code). Considering that, do you still desire a solution?

Images can be added to a post via raw html:

<img src="imageurl" />


#3

@CJW Yes I very much want a solution. I can’t think of anything short of creating an image for every variation.


#4

@fantom although creating an image for every solution may seem like a lot of work, it’s a lot easier than changing the .js/.css code and the risking not having your game published. Also, it isn’t very hard to do- it just needs a lot of time. If it’s what you want for your game, I’d go for it (although if there are 4 different parts that’s 256 combinations)!


#5

@Redgrave Well I was hoping to let the player have a pretty good amount of customization, like choosing hair color, eyes, whether they were large or small, or even if they were human. Basically, my hope was to have character customization not dissimilar from many video games, just 2D.


#6

@Redgrave So do you think it would be better go with a standard image for race and gender, or just stick with the text description?


#7

@fantom an image would look way cooler, and would make the game stand out from others as well as making character customisation a lot better, but it would take a lot of time to do if you let them choose eye colour etc. etc. So really, it all boils down to how much time you have and how you’re willing to spend it :slight_smile:


#8

I’m just going to toss this out there, but if anyone knows how to modify choice script so that there isn’t a space between the images, I’d still like to give it a shot. If it makes it unpublishable, it should be easy enough to remove.


#9

Does anybody at least know which file I would have to mess around with?


#10

From what CJW said earlier, I think it’s the Style.css file that you should open outside of the ‘mygame’ folder.


#11

Also, does anybody know how to contact Dan Fabulich? I would imagine if anybody could help with a choice script question, he could.


#12

@fantom I’d ask Jason, but he might not have internet for a while, so I don’t if he will be able to get back to you on that.


#13

Ah ha! Found the spacing for the images! That was easier than I thought it’d be. *cackles*


#14

Can we see?


#15


#16

And to top it off, I found an awesome character image generator, so I shouldn’t have to draw all the variations myself :slight_smile:


#17

thank you bro this will help me a lot too love you :X


#18

lol


#19

@fantom was it in the Style.css file?


#20

Yep, under the section:
}

.alignleft {
display: inline;
float: left;
margin-right: 1.625em;
margin-bottom: 1em;
}
.alignright {
display: inline;
float: right;
margin-left: 1.625em;
margin-bottom: 1em;
}
.aligncenter {
clear: both;
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: 0em;
}