Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 16,302 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
sword...appear!!! #402096
05/30/12 00:34
05/30/12 00:34
Joined: Dec 2010
Posts: 100
D
Dega Offline OP
Member
Dega  Offline OP
Member
D

Joined: Dec 2010
Posts: 100
Thanks for reading!
I am trying to get a sword to appear in front of my player but when I enter "player.x + 16" (and I knew this wouldn't work) it just appears behind him when he is facing the opposite direction because it is not in reldist. What I am wondering is how do I make it face the players direction and appear in front of him at all times? Really can't figure this out. Here is what I got so far:
Code:
action sword_stuff()
{
	var percent;
	var sword_timer = 10;
	my.pan = player.pan;
	while(1)
	{
		percent += 0;
		ent_animate(player,"atk",percent,NULL);
		my.pan += 5 * time_step;
		sword_timer -= 1 * time_step;
		if (sword_timer <= 0)
		{
			ent_remove(me);
			return;
		}
		wait(1);
	} 
}




boolean my.awesomeness = so true;
Re: sword...appear!!! [Re: Dega] #402100
05/30/12 03:15
05/30/12 03:15
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
by giving the position the player's rotation. Therefor use

vec_rotate


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: sword...appear!!! [Re: Espér] #402102
05/30/12 03:42
05/30/12 03:42
Joined: Dec 2010
Posts: 100
D
Dega Offline OP
Member
Dega  Offline OP
Member
D

Joined: Dec 2010
Posts: 100
Thanks Esper. You always have been a huge help!


boolean my.awesomeness = so true;

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1