Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-02-2006, 05:34 AM
mYg0tHaMpStEr mYg0tHaMpStEr is offline
Never trust anyone.
mYg0tHaMpStEr's Avatar
Join Date: Jul 2006
Location: Mars
Posts: 98
mYg0tHaMpStEr is on a distinguished road
Send a message via AIM to mYg0tHaMpStEr Send a message via MSN to mYg0tHaMpStEr
Car script...? xd

Hey, I'm having trouble with a car script...

This is what I have. I want this to be similar to GXes (because they r leet. gj joey ) Like a trunk and Radio and they'll have 2 people with one person shooting.

Then I'de like them parkable with keys to drive. I have this so far.. Can anyone complete this? (Joey.. XD)

NPC Code:
//#CLIENTSIDE
function onCreated() enabledefmovement();
function onWeaponFired()
{
onCreated();
this.car = !this.car;
if ( this.car ) onTimeOut();
if ( !this.car ) setTimer( 0 );
}
function onTimeOut()
{
disabledefmovement();
showimg( 1, "fc_car.png", player.x, player.y );
findimg( 1 ).rotation = this.ang;
if ( keydown( 3 ) )
{
this.ang -= .1;
}
if ( keydown( 1 ) )
{
this.ang += .1;
}
if ( keydown( 0 ) )
{
player.x -= cos( this.ang ) * 1;
player.y -= sin( this.ang ) * 1;
}
setTimer( 0.05 );
}



Thank you!
-Ork
__________________
Quote:
Originally Posted by Utopia RC Chat
lesmA: it's a good thing i can count to 10 now using gscript, you know, in case i forget how irl
Quote:
Originally Posted by Utopia RC Chat
lesmA: woo now i can make it count to 10 over 10 seconds!
lesmA: WATCH OUT SKYLD, HERE COME'S LESMA THE NEW SUPER-SCRIPTER!!!
Ork: ROFL
Ork: ANOTHER BRILLIANT FORUM SIG QUOTE
lesmA: oh god i should just stop talking before i make a fool of myself
Reply With Quote
  #2  
Old 12-02-2006, 05:57 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
Quote:
Originally Posted by mYg0tHaMpStEr View Post
cos( this.ang ) * 1
isn't that the same as cos( this.ang )?


Did anyone help you with this script?

Edit:
Btw, for the infamous question, ARE YOU DOING THIS OFFLINE?
Reply With Quote
  #3  
Old 12-02-2006, 06:23 AM
mYg0tHaMpStEr mYg0tHaMpStEr is offline
Never trust anyone.
mYg0tHaMpStEr's Avatar
Join Date: Jul 2006
Location: Mars
Posts: 98
mYg0tHaMpStEr is on a distinguished road
Send a message via AIM to mYg0tHaMpStEr Send a message via MSN to mYg0tHaMpStEr
Quote:
Originally Posted by Bl0nkt View Post
isn't that the same as cos( this.ang )?


Did anyone help you with this script?

Edit:
Btw, for the infamous question, ARE YOU DOING THIS OFFLINE?
1) Dunno

2) No, this is ONLINE.
__________________
Quote:
Originally Posted by Utopia RC Chat
lesmA: it's a good thing i can count to 10 now using gscript, you know, in case i forget how irl
Quote:
Originally Posted by Utopia RC Chat
lesmA: woo now i can make it count to 10 over 10 seconds!
lesmA: WATCH OUT SKYLD, HERE COME'S LESMA THE NEW SUPER-SCRIPTER!!!
Ork: ROFL
Ork: ANOTHER BRILLIANT FORUM SIG QUOTE
lesmA: oh god i should just stop talking before i make a fool of myself
Reply With Quote
  #4  
Old 12-02-2006, 06:25 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
Well one thing I noticed is as soon as you fire the weapon, it's setting this.car false. According to this script, for the timeout to activate, this.car needs to be true.
Reply With Quote
Reply


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 +2. The time now is 11:53 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.