Prominent's Recent Forum Activity

  • Where do I access my bookmarked topics?

    You can click to bookmark them at the bottom of a topic, but i see no way of finding which ones ive bookmarked.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • hm yea, I'm currently trying to implement some font stuff too.

    I'm trying to figure out how to scale sprites to a 1 to 1 pixel ratio regardless of the camera distance from them. That way I can have clear/readable text in perspective mode. If anyone has suggestion on how to accomplish this, let me know.

    edit:

    seems like this works to get correct size as long as the distance from camera is equal to the camera position's length.

    sprite.width*(camera.height/camera.width)

    sprite.height*(camera.height/camera.width)

  • sounds cool, I'll be interested to see how this goes.

  • Ah, cool. It's interesting seeing the different ways. I like the simplicity of not using regex, but regex also makes it simpler in a different way. Now I need to decide which way I like more.

  • Magistross , yes that is very interesting/insightful! Using a dictionary for each sprite is something I was thinking about already, but now it makes more sense. I assume the dictionaries for the sprites should have the global value turned off, otherwise they'd continue to spawn new dictionaries if layout is reset? Thanks!

  • Okay, I think I found a suitable way to do it:

    although, if anyone knows a better way, let me know.

  • Okay, then something else other than instance variable is fine. I'm just stuck on the parsing- how to differentiate between [dictionary and [player for example, and then substitute those spaces with other appropriate data.

  • I have a string that looks something like this:

    [dictionary:test]==2&&[playerItem:Apple]!=0[/code:1ijyleqr]
    I need help figuring out how to replace the stuff within the [ ] with a value from a dictionary, and a value from a sprite object.
    
    So I need it to become
    [code:1ijyleqr]Dictionary.Get("test")&"==2&&"&player.apple&"!=0"[/code:1ijyleqr]
    
    edit: also it should work if the string is this instead (or any other configuration):
    [code:1ijyleqr][playerItem:Apple]==2&&[playerItem:Pear]==1&&[dictionary:test]!=0[/code:1ijyleqr]
  • mattb , increase the raylength. The ray checked its complete length of 1000, and there weren't any collisions so it made no reflections. Use a higher raylength and it'll work.

  • mattb , The next laser is getting caught on the edge of the square(you can see there are more than one contact object on the edge when no laser reflects)..

    here's the fix:

  • I'm trying to design a dialog system and I am thinking about the structure for the data. I want to make sure I can cover a wide array of possibilities, but I'm unsure if I'm on the right track.

    This is what I have currently in xml:

    <game>
    
    <layout id='layout 104'>
    	<interaction id='0' with='1'>
    		<condition prerequisites='none' disqualifiers='boughtFarm'>	
    			<speaker id='npc' pos='right'>Hello, welcome to the farm.\nThe place is a bit old.</speaker>
    			<go to='menu' value='0' />
    		</condition>
    		<condition prerequisites='boughtFarm' items='farmDeed'>
    			<speaker id='npc' pos='right'>Congratulations on your new- I mean, old farm.</speaker>
    			<event action='createcondition' value='welcomeFarm' />
    		</condition>
    	</interaction>
    	
    	<menu id='0'>
    		<item disqualifiers='dontMind' goto='1'>I don't mind.</item>
    		<item disqualifiers='howOld' goto='2'>How old is it?</item>
    		<item prerequisites='howOld' goto='3'>This place is too old.</item>
    		<item prerequisites='howOld' goto='4'>A place with some history can be interesting.</item>
    	</menu>	
    	<menu id='1'>
    		<item prerequisites='(money>=5000)' goto='5'>I would like to buy it.</item>
    		<item goto='6'>I'll think about it.</item>
    	</menu>
    	
    	<interaction id='1' with='1'>
    		<speaker id='player' pos='left'>I don't mind.</speaker>
    		<speaker id='npc' pos='right'>Great!\nWould you like to buy it?\nIt costs 5000 dollars.</speaker>
    		<event action='createcondition' value='dontMind' />
    		<go to='menu' value='1' />
    	</interaction>
    	
    	<interaction id='2' with='1'>
    		<speaker id='player' pos='left'>How old is it?</speaker>
    		<speaker id='npc' pos='right'>It's about 100 years old.</speaker>
    		<event action='createcondition' value='howOld' />
    		<go to='menu' value='0' />
    	</interaction>
    
    	<interaction id='3' with='1'>
    		<speaker id='player' pos='left'>This place is too old.</speaker>
    		<speaker id='npc' pos='right'>Yeah, it requires a lot of work.</speaker>
    	</interaction>
    	
    	<interaction id='4' with='1'>
    		<speaker id='player' pos='left'>A place with some history can be interesting.</speaker>
    		<speaker id='npc' pos='right'>Not much happened here.</speaker>
    	</interaction>
    	
    	<interaction id='5' with='1'>
    		<speaker id='player' pos='left'>I would like to buy it.</speaker>
    		<speaker id='npc' pos='right'>Okay, that will be 5000 dollars.</speaker>
    		<event action='giveMoney' value='5000' />
    		<speaker id='npc' pos='right'>Thanks! Here's the deed to the farm.</speaker>
    		<event action='getItem' value='farmDeed' />
    	</interaction>
    </layout>
    [/code:2p3dc7aq]
    Perhaps someone who has more insight into this sort of thing can lend me some tips/advice. I'm not sure if I like what I have.
  • Looking really good. I want to play this.

Prominent's avatar

Prominent

Member since 28 Apr, 2012

Twitter
Prominent has 9 followers

Trophy Case

  • 12-Year Club
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Email Verified

Progress

15/44
How to earn trophies