Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > Star Wolves

Star Wolves 3D space RPG with deep strategy and tactical elements

Reply
 
Thread Tools Display Modes
  #1  
Old 12-08-2010, 06:31 AM
Goblin Wizard Goblin Wizard is offline
Approved Member
 
Join Date: Oct 2008
Posts: 508
Default

Quote:
Originally Posted by Goumindong View Post
thatWhat would be interesting is if i could create a sub extension off of poisondetonator or distance detonator in order to do what I want. Or if i could add another parameter to the schema of impactdetonator and have the game actually use it.
You can't. All detonators' parameters are hardcoded. I've never found out what the xml schema is really for.

Below you have an example how the ShipPoisoning script may look.
Code:
function ShipCanBePoisoned(ship)
	pilot = ship:GetPilot();
  
  if not (GetCurrentLocation() == "x220") or not (GetCurrentLocation() == "Precursors") or not (GetCurrentLocation() == "DisonSphere") then
    if (pilot == nil) then
  		return FALSE;
  	else
      if (GetQuestLabel("warhead_type") == "depol") then
        ship:SetShield(0);
        ship:PlayFX("Depol.bfx");
        return FALSE;
      elseif (GetQuestLabel("warhead_type") == "blast") then
        return FALSE;
      else
        return TRUE;
      end;
    end;
  else
  	if (pilot == nil) then
  		return FALSE;
  	else
  		if (pilot:HavePerk("Alien")) then
  	    return FALSE;
  		else
  	    return TRUE;
  		end;
  	end;
  end;
end;

--function ShipCanBePoisoned(ship)
--	pilot = ship:GetPilot();
----  flight = pilot:GetFlight();
--  
--  if not (GetCurrentLocation() == "x220") or not (GetCurrentLocation() == "Precursors") or not (GetCurrentLocation() == "DisonSphere") then
--    if (pilot == nil) then
--  		return FALSE;
--  	else 
----  	(GetQuestLabel("warhead_type") == blast) then
--      ship:SetShield(0);
----      flight:Stop();
----      ship:ApplyImpulse(100, Vector3(0, 1, 0));
----      myfunction();
--      return FALSE;
----    else
----      return FALSE;
--    end;
--  else
--  	if (pilot == nil) then
--  		return FALSE;
--  	else
--  		if (pilot:HavePerk("Alien")) then
--  	    return FALSE;
--  		else
--  	    return TRUE;
--  		end;
--  	end;
--  end;
--end;
It's just an example what I've been working on (it's far from what I've expected). GetQuestLabel thing was conncted with special "swich" skill . Every use of that skill changes the missile "warhead" type so without changing missile type you can change the way it works.

The main problem is that this script is connected with every poison detonator you make. It's hard to find good ifs to make it works differently for each type of missile. To make it work like normal missile you have to set poisoning effect damage to 0 and time to something like 1s or even 0.1s.
Reply With Quote
  #2  
Old 12-09-2010, 01:08 AM
Goumindong Goumindong is offline
Approved Member
 
Join Date: Nov 2010
Posts: 14
Default

Yea, I am trying to think of what info we can pull off the ship or from a global area that would help us but I am failing pretty hard at it.
Reply With Quote
  #3  
Old 12-09-2010, 06:26 AM
Goblin Wizard Goblin Wizard is offline
Approved Member
 
Join Date: Oct 2008
Posts: 508
Default

I don't know exactly what you want to do but you can check through the scripts how the phrase "ship:" is used. You'll have an idea about functions working directly with ship like "ship:GetPilot()". Check this Manual too.

Last edited by Goblin Wizard; 12-09-2010 at 06:28 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

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. The time now is 02:23 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.