Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 1,395 guests, and 12 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 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 | chip programmers | 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