Menu

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.

Show posts Menu

Messages - Khristian Cammilleri

#101
Yes,,,
Suppose that you want to Smash a Npc with a Stick..

I ve added one new cursor "smash"...
Then in the Global script I Have to give an Action when i use that cursor on a Npc...


How exactly should the code be?..

if the npc is on the right side of the character?
if the npc is on the left side of the character?



#102
Uhmmm...So How Exactly your Code Looks Like???


And How Should I Translate It  On My Script?
#103
For Further information
If the npc is on the right side of me,the playere must run a loop smashing in that direction....otherwise, he has to smash the npc with another loop (left)

When I "Smash" The Npc..The player Runs A loop...
while the npc is falling...
then he stop following the player...etc
Code: ags
followcharacter(null)


Finally I have to send The npc to the room (-1)
and unlock the view for the character...

It's Pretty tricky for me...I need help...
How can I Make a code with all this?

#104
Beginners' Technical Questions / Killing a Npc
Fri 31/07/2009 14:11:31
In My Last Post I Asked How Can Be Killed  My Main Character By A Npc...
I Recieved Some Good Codes...and Now They Work Fine.... ;D

Now I Want To Kill A npc using a new cursor (SMASH :-X)
How exactly would be my code?

Should I Use
Code: ags
if((cEgo.x <= cZombie1.x+20 || cEgo.x <= cZombie1.x-20) && ((cEgo.y <= cZombie1.y + 10)  && (cEgo.y >= cZombie1.y -10))&&(attack==0))
???

And then What??
Please i Always got a Mess With Fight Scripts....
#105
If You Are Good At Drawing And You Don't Need Any Pre-made background you can use GIMP ;D

I Use It And It's awesome!

It is like Photoshop, with a lot of visual effects And is totally free!

i Recommend it

www.gimp.org

I Hope you like it
#107
 ;D
Yes, It Works Perfectly

Thanks Everybody!!!
#109
Quote from: Mr Matti on Tue 28/07/2009 16:18:49
int attack=0;

// in the rep-ex:

if (zombie is close && attack==0){
 attack=30;
 hp-=10;
}

if(attack>0) attack--;
Mmm It Does The Same..  :-[
Or Perhaps I'm Putting it In the Wrong Place
#110
You Should Use FollowCharacter

Code: ags
Character.FollowCharacter(Character* chartofollow, optional int dist,
                          optional int eagerness)


Pass CHARTOFOLLOW as null to stop the character following

DIST sets how far away from CHARTOFOLLOW that CHARID will stand. If DIST is 1, they will try to stand very close; if DIST is for example 20, they will stand about 20 pixels away.

EAGERNESS sets on average how long the character will stand around before checking if he needs to move again. Setting this to 0 means that he will always be on the move until he reaches CHARTOFOLLOW; setting this to 99 means that he will pause and think for a while on route. Values in between specify different lengths of idle time.


The FollowExactly Command Is useless if  you want to make a character to follow your player ::)
#111
Ok..Now The Player is Attacked...Then He Loses 10 HP of 100 hp
But He Loses His Health Instantly...

My Code:

Code: ags
function room_RepExec()
{
if ((cEgo.x <= cZombie1.x+20 || cEgo.x <= cZombie1.x-20) && ((cEgo.y <= cZombie1.y + 10)  && (cEgo.y >= cZombie1.y -10)))
 {
 cZombie1.LockViewFrame(5, 8, 0);cZombie1.Animate(8, 3,eOnce, eNoBlock);
 PlaySound(0);gHealth-=10;
 }

How Can I Fix It?
#112
Wow! So Many Answers ;D
Thanks a lot!!!
#113
So I Just Have To Copy Exactly That Using My Own Characters Right?
:D
That's A Very Common Question But I Never Finish To Understand It...


Thanks!  ;D
#114
I Have Tried Many Times But I Can't Find The Right Script...
The Basic Idea Is :  ???
If The Main Char Is Very Close The Bad Guy Attacks Him...

What Should I Use?
IsCollidingWithChar Or AreThingsOverlapping....And How It Works?? :'(

Please Need Help  ::)


#115
Ok ;)
I Will Try How It Works
Thanks! ;D
#116
Oh! One More Thing...
Where Should I Put All This Script?
Global Script? ???
#117
Hi!  ;D This Is My First Post...
I need Help in Creating a good System for zombies..

Any Ideas?

This is What i Did But It's Not Nice At All  :-\
First I Make them follow me (FollowCharacter) And Then Attack If They Are Very close...(IsCollidingWithChar)

But How Can I Do To Finish Them?
I Made A New Function (smash) :o
So..when I Call that function..Character Animates Smashing The zombie...

Please If You Have Any Ideas Answer...
Thanks For All
SMF spam blocked by CleanTalk