Welcome Guest ( Log In | Register )

[ Big| Medium| Small] -



Post new topic Reply to topic  [ 4 posts ] 
    gRaViJa
  Thu Mar 08, 2012 11:47 pm
Creator of Ascension
User avatar
Member


Location: Belgium
First real help thread on hbgames! :p I have a global variable Score and a global variable Multiplier (this is just hardcoded int, 125 for example).

When the players finishes a level, he goes to a new layout (let's call it result) And he get's his final score. This variable finalScore should be "Score * Multiplier". But I can't get this right in C2. Any help?

Kinda stupid that i have to ask this because i can easily do this in javascript, php, c#, ruby... But not in a game-engine ^_^"

edit: ok, seemed like a syntax error. I typed "& score * & multiplier" while "score *multiplier" is enough to work. I don't yet really know when to use "&" in texts and when not. Anyone knows more about it?


Top Top
Profile      
 

    gRaViJa
  Fri Mar 09, 2012 12:30 am
Creator of Ascension
User avatar
Member


Location: Belgium
Ah, "&" is for concatenation of course. Where's my mind? At this rate my game will be done in a week, though... Nice!


Top Top
Profile      
 

    valkyriegames
  Sun Mar 11, 2012 3:24 pm
User avatar
Awesome Bro


Location: Australia
Haha that's exactly it! You figured it out yourself :) Don't get confused with the &. It's not C! :)

_________________
Image

Content Hidden


Image
Content Hidden


Top Top
Profile      
 

    joannesalfa
  Mon Apr 02, 2012 7:29 am
User avatar
Member

& is thing which creates an own string to some variables, i don't know if you checked this page http://www.scirra.com/tutorials/77/nati ... t-2/page-1 it helped me a lot when i make my first game


Top Top
Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


Who is online

Users browsing this forum: No users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

We are an independent, not-for-profit game making community.
Homepage
Board Index
About Us
Downloadable Games
Free Browser Games
Games in Development
RPG Maker Support
Game Maker Support
Construct 2 Support
HBGames the eZine
Advanced RPG Maker
Site Announcements
Powered by phpBB © phpBB Group