A Few Sinple Leveledit Questions [message #272713] |
Thu, 12 July 2007 03:33 |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma: 0
|
General (4 Stars) |
|
|
1) Whats does those cameras in the air i see in every map?
2)what does the small blocker do?
3)when i add secret places under maps it gets really weird things start to go invisible and parts u cant see how could i fix that?
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: A Few Sinple Leveledit Questions [message #272836 is a reply to message #272713] |
Thu, 12 July 2007 13:35 |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma: 0
|
General (4 Stars) |
|
|
whast the 2 basic command strings for changing ur health and armor type in c++?
i think this is for changing the armor into a chenwarrior
Commands->Set_Shield_Type(obj,"SkinChemWarrior");
but what about the health?
|
|
|
|
Re: A Few Sinple Leveledit Questions [message #272844 is a reply to message #272713] |
Thu, 12 July 2007 14:50 |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma: 0
|
General (4 Stars) |
|
|
hmm il try it :S
ok ne question i got this code form white dragon to make it able to read and text file for each of my codes can have a diffrenet mod list heres the code
bool Is_Mod(const char *File, const char *Name) {
fstream; file(File, ios::in);
string; tmp;
while(file >> tmp) {
if(strcmp(Name, tmp.c_str()) == 0) {
return true;
}
}
return false;
};
heres the command
bool class TestChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
if (Is_Mod("Test_Mods.txt",Get_Player_Name_By_ID(ID))) {
GameObject *obj = Get_GameObj_By_Player_Name(Text[0].c_str());
Change_Team(obj,2);
Commands->Give_Powerup(obj,"CnC_POW_AutoRifle_Player_Nod",false);
SimpleDynVecClass<GameObject*> List = Get_All_Objects_By_Preset(2,"Signal_Flares");
int Rand = Commands->Get_Random_Int(0,List.Count());
GameObject *RandObj = List[Rand];
Commands->Set_Position(obj,Commands->Get_Position(RandObj));
}
}
}
and heres the error
------ Rebuild All started: Project: Plugin, Configuration: Release Win32 ------
Deleting intermediate and output files for project 'Plugin', configuration 'Release|Win32'
Compiling...
cl : Command line warning D9040 : ignoring option '/analyze'; Code Analysis warnings are not available in this edition of the compiler
scripts.cpp
scriptregistrar.cpp
scriptfactory.cpp
mmgr.cpp
engine_weap.cpp
engine_threading.cpp
engine_tdb.cpp
engine_string.cpp
engine_script.cpp
engine_pt.cpp
engine_player.cpp
engine_phys.cpp
engine_obj2.cpp
engine_obj.cpp
engine_net.cpp
engine_math.cpp
engine_io.cpp
engine_game.cpp
engine_dmg.cpp
engine_diagnostics.cpp
Compiling...
engine_def.cpp
engine_common.cpp
engine_bhs.cpp
dllmain.cpp
plugin.cpp
.\plugin.cpp(63) : error C2065: 'fstream' : undeclared identifier
.\plugin.cpp(63) : error C2653: 'ios' : is not a class or namespace name
.\plugin.cpp(63) : error C2065: 'in' : undeclared identifier
.\plugin.cpp(63) : error C3861: 'file': identifier not found
.\plugin.cpp(64) : error C2065: 'string' : undeclared identifier
.\plugin.cpp(64) : error C2065: 'tmp' : undeclared identifier
.\plugin.cpp(65) : fatal error C1903: unable to recover from previous error(s); stopping compilation
gmsettingsclass.cpp
gmmain.cpp
gmfunc.cpp
gmcommandclass.cpp
engine_gm.cpp
date.cpp
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 8.00.50727
Copyright (C) Microsoft Corporation. All rights reserved.
BSCMAKE: error BK1506 : cannot open file '.\tmp\scripts\plugin.sbr': No such file or directory
Build log was saved at "file://c:\Documents and Settings\Owner\Desktop\Temp\SSGM 2.0.1 WFDS\Plugin Example Source\Plugin Example Source\tmp\scripts\BuildLog.htm"
Plugin - 8 error(s), 1 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
now white dragon made the random part in the code and the bool thing so maybe he can tell me whats wrong?
so pretty much the code he gave me is missing somthing or somthing
[Updated on: Thu, 12 July 2007 14:51] Report message to a moderator
|
|
|
|
|
|
Re: A Few Sinple Leveledit Questions [message #272873 is a reply to message #272713] |
Thu, 12 July 2007 18:01 |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma: 0
|
General (4 Stars) |
|
|
dont know what u mean but heres the whole section
/* Renegade Scripts.dll
Example Plugin Code
Copyright 2007 Whitedragon(MDB), Jonathan Wilson
This file is part of the Renegade scripts.dll
The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version. See the file COPYING for more details.
In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
Only the source code to the module(s) containing the licenced code has to be released.
*/
/* This is designed to serve as both an example on how to make a plugin and to give users the basic framework of a plugin.
The plugin is simple: it creates an object creation hook and attaches the script "Plugin_Example_Script" to all objects.
The script prints out a message whenever an object is created or destroyed.
There are also examples of the new format for bhs.dll hooks.
*/
#include <fstream>
#include "scripts.h"
#include <stdarg.h>
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
#include "engine.h"
#include "gmmain.h"
#include "plugin.h"
//This is called in Set_Script_Commands the same way that SSGM_Secondary_Load is called in SSGM.
//Keeps the loading code specific to the plugin out of dllmain.cpp.
//This is not required, you can do your loading code anyway you want.
void Plugin_Load() {
}
//Called in SSGM_Plugin_Unload. Keeps the unloading code specific to the plugin out of dllmain.cpp.
//This is not required, you can do your unloading code anyway you want.
void Plugin_Unload() {
}
bool Is_Mod(const char *File, const char *Name) {
fstream; file(File, ios::in);
string; tmp;
while(file >> tmp) {
if(strcmp(Name, tmp.c_str()) == 0) {
return true;
}
}
return false;
};
bool class testChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
if (Is_Mod("Test_Mods.txt",Get_Player_Name_By_ID(ID))) {
GameObject *obj = Get_GameObj_By_Player_Name(Text[0].c_str());
Change_Team(obj,2);
Commands->Give_Powerup(obj,"CnC_POW_AutoRifle_Player_Nod",false);
SimpleDynVecClass<GameObject*> List = Get_All_Objects_By_Preset(2,"Signal_Flares");
int Rand = Commands->Get_Random_Int(0,List.Count());
GameObject *RandObj = List[Rand];
Commands->Set_Position(obj,Commands->Get_Position(RandObj));
}
}
};
[Updated on: Thu, 12 July 2007 18:03] Report message to a moderator
|
|
|
|
|
|
|
|
|