Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
2 registered members (3run, AndrewAMD), 667 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
set my, unpassable? #369857
05/08/11 01:13
05/08/11 01:13
Joined: Dec 2009
Posts: 361
R
rtsgamer706 Offline OP
Senior Member
rtsgamer706  Offline OP
Senior Member
R

Joined: Dec 2009
Posts: 361
I am a programmer working with the free version of A8.
At one point in the game my character becomes passable through

set (my, PASSABLE);

once a collision has happened I added

reset (my, PASSABLE);

but my character is still passable!
What am I doing wrong?
Thanks
Rtsgamer706

Re: set my, unpassable? [Re: rtsgamer706] #369858
05/08/11 01:39
05/08/11 01:39
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
hm ? can you show the code ? because thats weird, reset is what you should be calling ...

Re: set my, unpassable? [Re: darkinferno] #369882
05/08/11 13:25
05/08/11 13:25
Joined: Dec 2009
Posts: 361
R
rtsgamer706 Offline OP
Senior Member
rtsgamer706  Offline OP
Senior Member
R

Joined: Dec 2009
Posts: 361
my "bad guy" has the following code set as "my.event ="
Quote:
action game_over()
{
if(event_type = EVENT_ENTITY)
{
if(jump < 1)
{
flashing = 65;`
if(!you.skill57)
{
alive -= 1;
set (your, PASSABLE);
wait(-0.5);
my.pan += 180;
if (flashing <= 1)
{
c_move (me, vector(0, 0, 37*time_step), nullvector, GLIDE); // move the player up
reset (character, PASSABLE);
flashing = 0;
}
if (flashing >= 1)
while (my)
{
flashing -= 1;
wait(1);
}
}
}
}
}


character is the pointer to my main character
I know the variable is decreasing and everything.
What happens is when I get hit I become invincible (passable) and gravity disables
After 65 frames gravity re-enables, but since my guy won't "reset" his passable I fall through the floor!
Thanks for the help and tell me if you need to know anything else.
Rtsgamer706

Re: set my, unpassable? [Re: rtsgamer706] #369924
05/09/11 13:31
05/09/11 13:31
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
if(event_type = EVENT_ENTITY)

is wrong:

if(event_type == EVENT_ENTITY)

And use the code tags, more easy to "read" your code!

Last edited by Widi; 05/09/11 13:33.
Re: set my, unpassable? [Re: Widi] #369935
05/09/11 16:04
05/09/11 16:04
Joined: Dec 2009
Posts: 361
R
rtsgamer706 Offline OP
Senior Member
rtsgamer706  Offline OP
Senior Member
R

Joined: Dec 2009
Posts: 361
the second = didn't change anything
the action still runs fine, my problem is that I fall through the floor.
What do you mean by "code tags?"
Thanks for the help.
Rtsgamer706

Re: set my, unpassable? [Re: rtsgamer706] #369936
05/09/11 16:16
05/09/11 16:16
Joined: Feb 2010
Posts: 320
TANA/Madagascar
3dgs_snake Offline
Senior Member
3dgs_snake  Offline
Senior Member

Joined: Feb 2010
Posts: 320
TANA/Madagascar
Hi,

Perhaps "your" and "character" variables point to different entities.

in your code :
Code:
set(your, PASSABLE);


and
Code:
reset(character, PASSABLE);



Is it really what you want?

Best regards.

Re: set my, unpassable? [Re: 3dgs_snake] #369947
05/09/11 17:51
05/09/11 17:51
Joined: Aug 2002
Posts: 2,183
Germany, BaW�
Rondidon Offline
Expert
Rondidon  Offline
Expert

Joined: Aug 2002
Posts: 2,183
Germany, BaW�
Could you repost your code using the [ code ] tags instead of [ quote ]? It`s really hard to read your code. And comments would be nice.

That´s what I`m talking about:

Code:
//////////////////////////////////////////////////////////////
// Code to show a text with "hello world" on engine startup //
//////////////////////////////////////////////////////////////

#include <acknex.h>  //include the engine
#include <default.c> 

STRING* my_sample = "hello world"; //the sting

FONT* test_font = "arial#20b"; //the font

TEXT* my_notice = //text object "my_notice"
{
	pos_x = 100; //x,y position
	pos_y = 200;
	font = test_font; //attach font to text object
	string = my_sample; //attach string to text object
}

function main() //main function running on engine startup
{
	set(my_notice,VISIBLE); //Show the text object on engine startup 
}



Re: set my, unpassable? [Re: Rondidon] #369958
05/09/11 21:38
05/09/11 21:38
Joined: Dec 2009
Posts: 361
R
rtsgamer706 Offline OP
Senior Member
rtsgamer706  Offline OP
Senior Member
R

Joined: Dec 2009
Posts: 361
Here it is:
Code:
action game_over()
{
	if(event_type == EVENT_ENTITY)
	{
		if(jump < 1)
		{
		flashing = 65;`
		if(!you.skill57)
		{
		alive -= 1;
		set (your, PASSABLE);
		wait(-0.5);
		my.pan += 180;
		if (flashing <= 1)
		{
		c_move (me, vector(0, 0, 37*time_step), nullvector, GLIDE); // move the player up
		reset (Mario, PASSABLE);
		flashing = 0;
		}`
		if (flashing >= 1)
		while (my)
		{
			flashing -= 1;
			wait(1);
		}
		}
		}
	}
}


Hope this helps
Rtsgamer706

Re: set my, unpassable? [Re: rtsgamer706] #370682
05/14/11 22:25
05/14/11 22:25
Joined: Dec 2009
Posts: 361
R
rtsgamer706 Offline OP
Senior Member
rtsgamer706  Offline OP
Senior Member
R

Joined: Dec 2009
Posts: 361
Hey A8 community
I haven't gotten a reply since I posted my code properly.
was just wondering if there was something wrong with the post
or if I really just have an unfix-able problem.
Thanks for the help
Rtsgamer706


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