Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > General > Gaming and Game Development

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-13-2011, 09:34 PM   #1
tjj2011
Registered User
 
Join Date: Oct 2011
Posts: 9
Question [AS2] how to get a character to spawn at a certain spot on a frame

In AS2 for example I am developing a top down rpg type game like Pokemon etc, I am wondering how to get a character to spawn at a certain spot on a frame, for example when he/she enters a house or exits a map and is taken to another frame via hit test how is it possible to set its spawn point?

Thanks in advance
tjj2011 is offline   Reply With Quote
Old 11-13-2011, 10:15 PM   #2
neilmmm
Senior Member
 
neilmmm's Avatar
 
Join Date: Oct 2005
Location: dorset
Posts: 1,637
Default

if you attaching just set the _x and the _y

Code:
var character_mc:MovieClip=this.attachMovie("character","character",this.getNextHighestDepth())
character_mc._x=exactSpot
character_mc._y=exactSpot
if placed on the stage manually just set the _x and _y

Code:
character_mc._x=exactSpot
character_mc._y=exactSpot
neilmmm is offline   Reply With Quote
Old 11-13-2011, 11:35 PM   #3
tjj2011
Registered User
 
Join Date: Oct 2011
Posts: 9
Default

Quote:
Originally Posted by neilmmm View Post
if you attaching just set the _x and the _y

Code:
var character_mc:MovieClip=this.attachMovie("character","character",this.getNextHighestDepth())
character_mc._x=exactSpot
character_mc._y=exactSpot
if placed on the stage manually just set the _x and _y

Code:
character_mc._x=exactSpot
character_mc._y=exactSpot
Thanks neilmmm, perfecto!
tjj2011 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:07 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.