Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - t4u

Pages: 1 2 3 4 5 ... 28
31
Ask a Question / Re: Is there a better way? code included
« on: November 16, 2015, 02:50:18 pm »
I would need concept drawings to give more dtialed answer but:

- For line actor you need one animation and move actor according to your needs 
- Instead of having 360 attributes have a list of attributes (I belive you can save it as well)

32
Ask a Question / Re: Die when one actor leaves the screen?
« on: November 16, 2015, 02:44:08 pm »
+1 to explanation post above

33
TIP: You can split your number into severals smaller numbers So it would be

a*10^10 + b*10^3 + c = your massive number

I remember similar problem when somebody wanted to make idle game. Don't rmember details. You can try finding tha tpost.

34
Ask a Question / Re: Die when one actor leaves the screen?
« on: November 15, 2015, 12:10:31 pm »
Scene behavior

custom event <kill_them_all>
kill actor_1
kill actor_2
reload scene

Actor behavior
On update
 If (x of self< 0 )or (x of self + width of self > scene width)
 trigger <kill_them_all>

35
Ask a Question / Re: Detecting Actor Clicks from Scene Behavior
« on: November 14, 2015, 04:24:53 am »
make actor behavior:
add actor attribute: <name>

when created:
set <name> to "none"

In scene behavior
as you create your clickable actor
for last created actor set <name> to  "john"

on click
for each actor on screen
 if  get <actor> attribute <name> from actor behavior <> == john
     //do something

36
Ask a Question / Re: Creating a custom player movement
« on: November 13, 2015, 01:28:36 pm »
Your code:

When created:
Go to position should be after set <X position>. At the moment of assinging X position is undefined.

Everything else:
(Unsure about this ) but I think text attributes must be in as text clause.

=============================
My code from attachment works. Mention me in game.

Remember:
1. It will make a left side of player allinged with mouse position so you need to may add offset (equal half of your actor width)
2. You may need to add restriciton so that player won't go offscreen

37
Ask a Question / Re: Creating a custom player movement
« on: November 13, 2015, 02:46:32 am »
When created:
Create player at x,y
go_to_position=x of player;  // this stores last clicked mouse position
movement direction = "none"; //text attribute right if mouse was cliked right of player, left when it was clicked lef tof player
speed = ?; //number value - how many pixels per frame you want your actor to travel;

On click:
set go_to_position=x of mouse;
if x of mouse > x of actor
      movement direction = "right"
if x of mouse < x of actor
      movement direction = "left"

On update
if  movement direction = "right"
     if go_to_position > x of actor + speed // it's ok to move because in next frmae player would be closer to last clicke //dposition but won't pass over it.
         x of actor =  x of actor + speed
    else
         movement direction = "none"

if  movement direction = "left"
     if go_to_position < x of actor - speed
         x of actor =  x of actor - speed
    else
         movement direction = "none"
==================================
may require readjusting in order to support non integer vlaues of speed And to prevent player from leaving the screen

       



38
Define what are you looking for. Post like yours "I'm looking for something with turns" gives too big scope.

I have done turn-based game but not sure if this is whatyou are looking for:
http://t4upl.blogspot.com/2015/10/stencyl-turn-based-strategy-difficulty.html

39
Ask a Question / Re: Need Some Help With An EndlessRunner Game
« on: November 06, 2015, 08:20:27 am »
Noob on board. Do the crash course first.

40
Ask a Question / Re: Help with next level
« on: November 06, 2015, 08:18:49 am »
^ +1

or print it to console.

41
Resolved Questions / Re: Actor following Main Player
« on: November 06, 2015, 08:17:07 am »
I assume you have used level creeator for placing objects in the scene.  This is noobish and can cause problems like yours. Create Ballon and player from code and then you will be able to use your behavior in each scene.

42
Read section "Creating a matrix of cards":
http://t4upl.blogspot.com/2015/03/stencylmatch-game-difficulty5.html   


43
Ask a Question / Re: Array Question
« on: November 01, 2015, 11:12:21 am »
Solution 1: Use normal list in such way that n = x of tile, n+1 = y of tile, n+2 = value of tile. So refferengin 5th tile in the list would be
list.get<(5-1)*3+0> - returns x of tile
list.get<(5-1)*3+1> - returns y of tile
list.get<(3-1)*3+2> - returns value of tile

Solution 2: You can take  a look at my Zerg infection project  (and matrix behavior) on my blog which pretty much has implamented what you want to achieve.



44
Ask a Question / Re: Seesaw behavior
« on: October 24, 2015, 10:37:53 am »
+1 to reply above

45
Ask a Question / Re: How can I randomize two randomized lists
« on: October 20, 2015, 04:46:08 pm »
0_o

Pages: 1 2 3 4 5 ... 28