Welcome Guest ( Log In | Register )

[ Big| Medium| Small] -



Post new topic Reply to topic  [ 85 posts ]  Go to page Previous  1, 2, 3
    rosareven
  Sun Mar 18, 2012 12:14 pm
House Vidae
User avatar
Sponsor


Location: Australia
@AeroLowe: Yes. Eventing_Guy's example will cause a loop, therefore you also need to add a "on [whatever button] clicked/pressed" condition into the same event, so that it only happens when that button is touched.

In other words, the event will have two conditions: button click/press, and cooldown = 0.

I did exactly that in my game, except I used a boolean, but that won't make a difference. You just need two different values to compare.

@Eventing_Guy RE: getting rid of background - Removing background in sprites does indeed mess up the collision. Construct 2 will automatically "guess" the collision area when you import sprites but it's not all that perfect. You will need to go into Edit animation to fix the collision polygons.

Note that if your sprite has several animation frames, once you adjust the collision for one frame, you can right click on the screen and choose "apply to all frames" or something like that, and it will apply the same shape in proportion to the rest of the frames. Again, it's not smart and if you have frames that change shape drastically, it will not adjust properly. So double check all frames quickly anyway to make sure they all have proper collision.


Top Top
Profile      
 

    Eventing_Guy
  Mon Mar 19, 2012 2:56 pm
User avatar
Awesome Bro


Location: Where the BROs are ALL just that Awesome
@ my collision problem.

Ah, just tried that... it works now.
Maybe I can Add Colored backgrounds now.

Thanks

MAKE background White

Image


Top Top
Profile      
 

    Jason
  Tue Mar 20, 2012 1:31 am
User avatar
Awesome Bro

Generic Townsperson
Does anybody know how to make an object, with the bullet behaviour, move AWAY from the player as opposed to towards him? I need something like this to set up the AI of my humans, I'm not quite sure how to do it...

_________________
This is a block of text that can be added to posts you make. There is a 9999 character limit.


Top Top
Profile      
 

    Eventing_Guy
  Tue Mar 20, 2012 2:38 am
User avatar
Awesome Bro


Location: Where the BROs are ALL just that Awesome
have you tried experimenting with "Physics?"

if you go to construct2 Examples - "Physics with 8 directions" might help.


Top Top
Profile      
 

    rosareven
  Tue Mar 20, 2012 2:45 am
House Vidae
User avatar
Sponsor


Location: Australia
You can also try making a formula in the parameter dialogue that sets the object's facing angle. Something like, facing the angle of the player then subtract 180, so that you're inverting the facing angle.


Last edited by rosareven on Tue Mar 20, 2012 5:14 am, edited 1 time in total.

Top Top
Profile      
 

    Jason
  Tue Mar 20, 2012 2:45 am
User avatar
Awesome Bro

Generic Townsperson
Actually no, I have not, lol. I'll take a look

_________________
This is a block of text that can be added to posts you make. There is a 9999 character limit.


Top Top
Profile      
 

    AeroLowe
  Wed Mar 21, 2012 2:57 am
User avatar
Member

Does anyone know how to make a camera that zooms in but also centers (kind of) on the player?
Like Mario or Mega Man or Sonic or something?


Top Top
Profile      
 

    BlueScope
  Wed Mar 21, 2012 1:15 pm
The Third Man
User avatar



Location: Germany
@J: There's a Bullet event action called 'set angle towards other object', or something like that, that lets you define two points and calculated an angle from that. If you feed it your image point's coordinates, you should be able to give the bullet the right direction pretty easily.
Alternatively, if you already have it moving towards the player, do what rosareven said:
Expand to see the code.


@AeroLowe: I'm not aware of a (classic) Mario or Sonic game that actually uses a zooming camera... but I would go with just scaling the layer/layout, which shouldn't need an additional player focussing, as everything in the center before will still be in the center. Needs about 1 event if you combine it with a global that stores the zoom factor.
Expand to see the code.

_________________
Image

If you have a slightly positive memory of my Power Shift contest game,
you might be interested in this development screenshot...
More info about that soon!


Top Top
Profile      
 

    Eventing_Guy
  Wed Mar 21, 2012 8:59 pm
User avatar
Awesome Bro


Location: Where the BROs are ALL just that Awesome
Venetia wrote:
Looking forward to your entry, EG :)

One note: When posting a link to your game, we won't want to download things, we'll be looking for a direct link to your uploaded HTML file. Your game will play within that HTML file.


1. How / Where do I do that?

----------------------------------------------------------------------------------------------------

2. I'm having a bit of a problem when I export... do I have to have the most up to date Construct 2
in order for it to work? Cause All it is doing is showing me a black screen.


Top Top
Profile      
 

    AeroLowe
  Wed Mar 21, 2012 10:16 pm
User avatar
Member

Eventing_Guy wrote:
Venetia wrote:
Looking forward to your entry, EG :)

One note: When posting a link to your game, we won't want to download things, we'll be looking for a direct link to your uploaded HTML file. Your game will play within that HTML file.


1. How / Where do I do that?

The index file is needed. You also need Dropbox installed.

Once you get it and have uploaded your game to there, retrieve the download link for the index file. Then just post it in the topic, got it?


Top Top
Profile      
 

    AeroLowe
  Wed Mar 21, 2012 10:34 pm
User avatar
Member

BlueScope wrote:
@AeroLowe: I'm not aware of a (classic) Mario or Sonic game that actually uses a zooming camera... but I would go with just scaling the layer/layout, which shouldn't need an additional player focussing, as everything in the center before will still be in the center. Needs about 1 event if you combine it with a global that stores the zoom factor.
Expand to see the code.

Oh, forgot what I said about zooming. I noticed I said my problem wrong. I need a close-up camera.

But your solution didn't really help me very much. It works fine (if noticeable at all unless I did it wrong), but I want it to be more of a close-up on the player and follow him throughout the layout, like in Mario or Sonic.


Top Top
Profile      
 

    rosareven
  Thu Mar 22, 2012 1:33 am
House Vidae
User avatar
Sponsor


Location: Australia
Eventing_Guy: After you export your project, open index.html with a text editor and put this under <script> (should be approximately 10 lines down from the top):

function log(){}

Then clear the cache in your browser and reload it.


Top Top
Profile      
 

    BlueScope
  Thu Mar 22, 2012 12:22 pm
The Third Man
User avatar



Location: Germany
@Aero: After looking into zooming yesterday myself, I didn't see a scale function at all... instead, it seems you have to work with size (unless I'm terribly unsmart about this).
In that case, what you would need to do is setting the layout/layer size equal to itself multiplied by the ScaleFactor. Problem with that is that I don't know off the top of my head if you can set the size of layouts/layers, so if you can't, this whole approach won't work...

_________________
Image

If you have a slightly positive memory of my Power Shift contest game,
you might be interested in this development screenshot...
More info about that soon!


Top Top
Profile      
 

    Amy
  Thu Mar 22, 2012 1:50 pm
User avatar
Staff

Big Dumb Guy
Hey guys, if you don't mind I might split this topic into several topics, that way it will be more useful to future people looking for support on the same things.


Top Top
Profile      
 

    Eventing_Guy
  Thu Mar 22, 2012 11:06 pm
User avatar
Awesome Bro


Location: Where the BROs are ALL just that Awesome
Can someone give me Step by step instructions on how "Drop Box" works.

What do I have to do in order to share my game over the web without
anyone having to download anything. :cute:


Top Top
Profile      
 

    01lifeleft
  Fri Mar 23, 2012 12:27 am
Maya researching...
User avatar
Member

Upload your exported game to dropbox.
After uploaded, find the file index.html, right-click on it, choose copy public link.
You have the link to share your game.

_________________
Image


Top Top
Profile      
 

    Glitchfinder
  Sat Mar 24, 2012 5:58 pm
BEWARE: Glitchfinder's sense of humor sucks.
User avatar
Staff

Party Mascot

Location: Approximately 93 million miles from Sol.
Since 01lifeleft's response is missing a bit in the way of details, you might want to check out the tutorial found here.

_________________

Just call me Glitch.


Top Top
Profile      
 

    Eventing_Guy
  Wed Mar 28, 2012 2:00 pm
User avatar
Awesome Bro


Location: Where the BROs are ALL just that Awesome
I created a timer... But I do Not know how to get it to stop...

Any Tips?


Top Top
Profile      
 

    AeroLowe
  Thu Mar 29, 2012 12:47 am
User avatar
Member

Isn't there an event action for that?

If x happens - Stop Timer?

On the other hand, does anyone know how I can implement proximity detection in Construct 2?
I have enemies, and it's a platformer...


Top Top
Profile      
 

    Eventing_Guy
  Thu Mar 29, 2012 1:13 am
User avatar
Awesome Bro


Location: Where the BROs are ALL just that Awesome
AeroLowe wrote:

Isn't there an event action for that?
If x happens - Stop Timer?



Trust me... I've been looking but can't seem to find it.

I even went to Construct 2 website... nothing


Top Top
Profile      
 

    rosareven
  Thu Mar 29, 2012 2:24 am
House Vidae
User avatar
Sponsor


Location: Australia
If there isn't a direct "Stop timer" option, you can create a boolean variable on any object and add that boolean check into the same event with the timer.

So the condition looks like:

ThatObject.StopTimer = false
System.EveryXSeconds


Top Top
Profile      
 

    Eventing_Guy
  Thu Mar 29, 2012 2:56 am
User avatar
Awesome Bro


Location: Where the BROs are ALL just that Awesome
Quote:
System.EveryXSeconds


not sure what you mean... but I think you actually gave me an Idea.

It involves

"Global variables" & "System X seconds" and "Set Text"


I'm gonna have to play around with it.

BRB


EDIT:

I did it... I was able to push a button (to test it out) and time stopped.
Press another button Time Resumed... Thanks... Indirectly Rosa...

after reading your post I was somehow was able to figure out a way
myself, that had nothing to do with what you said...

I'm weird like that... :lol:

Edit 2: Don't worry, I still have LESS then 50...


Last edited by Eventing_Guy on Thu Mar 29, 2012 3:12 am, edited 2 times in total.

Top Top
Profile      
 

    rosareven
  Thu Mar 29, 2012 2:58 am
House Vidae
User avatar
Sponsor


Location: Australia
I think Glitch mentioned that global variables take an event slot. If the variable can be shuffed into an object instead and use the variable from that object, that would save you an event slot.


Top Top
Profile      
 

    HiPoyion
  Mon Oct 03, 2016 12:25 am
S Q U E E Z Y T R I G G E R
User avatar
Sponsor

Generic Townsperson

Location: Falmouth
Anyone know how to compare multiple instance variables at one and then order them from highest to lowest? Sounds simple when I say it but...

_________________
Image


Top Top
Profile      
 

    LaDestitute
  Mon Oct 03, 2016 5:48 am
Gabber Robot
User avatar
Member

Party Mascot
You could probably do it using a loop and/or an array, though did you try the compare two values in system?


Top Top
Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 85 posts ]  Go to page Previous  1, 2, 3


Who is online

Users browsing this forum: No users and 2 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

cron
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