Jump to content

Acecool

Member
  • Content Count

    85
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by Acecool


  1. Treasure hunting is now in the game!

    "treasure objects" spawn around the map in marked locations (invisible to player), there is a 5% chance to spawn treasure at that location every 10 minutes! If treasure already exists at that point, new treasure will NOT spawn!!!

    This will be a nice way for people to make money, that know the locations!

    And I will be putting treasure markers in fun locations too!!!

    I will have this version uploaded within the next hour on my server!!! Use the player information to see how much money you have, try disconnecting and reconnecting to see it save and reload it :-)

    Current treasure is this:

    Piles of money are worth 250

    Dog tags are worth 50

    Laptop is 599

    Radio is 15

    Sat phone 399

    video projector is 125

    suitcase is 1000

    small tv is 45


  2. Just a quick update!

    I have added in a Player Information action and formatted it nicely (I hope)...

    I have added onto the Player Variables list.

    I scattered money around the spawn area to test saving/reloading of variables for players and IT WORKS!!! Pick up money and you are $500 richer, this will be part of the scavengerHunt/treasureHunt where you find random treasure around the map.

    Once you pick up the money, the pile of cash is gone (into your pocket of course)...

    Dedicated server is up if you guys want to connect, pick up some money, disconnect, reconnect and add more money and see how cool it is to keep your money that you worked for saved :-) - I might move the saving system to flatfile if possible later on.


  3. Saving/Loading MP State is now in the game.

    If a player connects, and is not in the "system" a new copy of the player variable set is created! If a player disconnects, and reconnects, his/her exp, money, licenses and all options will be reloaded, including guns possibly.

    Otherwise, anything that needs to spawn, or be given physically to the player will happen like guns! Guns will be given to the player in the NOT BEING SENT TO JAIL block of code!

    If a player disconnects to avoid jail time, they will be forced to serve in the town where they have the most time to serve, if it ends up being an allied town who also has stars for them, they will be transported there after their sentence to serve it there too (Only if player lands in neutral, because civ and terror both do not deport citizens)!

    Cars that have an owner who has stayed disconnected for over 10 minutes will be free to claim ownership of after 5 minutes to all players, destroyed after 10 or if claimed!

    Buildings will be destroyed and deleted after the player disconnects but the count on the player card stays! Once the player reconnects, ALL of the buildings will be "sold" and values reset to 0. They will be sold for 50ish% of what they were originally purchased for!

    Going to start setting up gun stores the same way as car dealers! Spawn the guns, and put them on the wall of a shop, you walk in, choose what you want, and buy it and it will be automatically equipped - gun stores will be a 1 marker deal, with all guns spawning relative to the building that I spawn! Different types of gun dealers!

    Pistol dealers, shotgun, rifle, ordinance, etc etc...

    Gun store product may be spawned based on the current (real time/on change) faction of a city. Terrorists will get more AK47 type weapons, while civilian can purchase mp5s and newer guns.

    I am having so much fun coding this :-P

    And I will be needing more testers tomorrow/today!!! IF you are interested, pm me, or just join the server!

    I am going to add respawning in soon!!!! Respawning will be based on faction! There will be a respawn marker, and then based on what cities your faction owns - you will spawn in a random one determined by the server, by setPos if need be!!!


  4. ccLogic is the name of a gameLogic in the game.

    first if its nil then it should create a new variable on the server called Acecool, and set it to true, then display the hint. Passed from client to server.

    If person dcs, then it should not be nil when it does getVariable, and it should hint its value!

    It doesnt seem to be working, can anyone check my syntax since I am getting no hints, from either side!! This script is being executed AFTER waitUntils for player!!

    //
    // Initializes the Player so that their info is saved and reloaded if they DC!!
    //
    _playerVar = ccLogic getVariable name player;
    if ( isNil( _playerVar ) ) then
    {
    // Initialize the variables!
    ccLogic setVariable [name player, true];
    
    hint "Done saving player var!";
    }
    else
    {
    hint format [ "%1", _playerVar ];
    };


  5. That is actually the map I am using now. I have stopped using mods!!!!!!

    I am now developing on Combined Operations though in order to have access to a few extra scripting commands and more online players.

    If you want to try it, connect to the server MaxRiga, I am running a CO server -=[RPG]=- CrimeCity Alpha at this moment!

    Only things required are Arma 2 and Operation Arrowhead for the 3d text and other commands soon possibly..


  6. Buying cars off the car lot works now :-)

    Instead of driving that particular car off, a new one is generated and put on the road for you and you are put in the driver seat and the doors lock :-P

    Its awesome, anything thats spawned with the setup map script can be duplicated by the player, and own it !!!!

    ---------- Post added at 05:36 AM ---------- Previous post was at 04:55 AM ----------

    Server is being left up, if you join, play the Crime City Alpha 1_26

    You can claim ownership on vehicles, and those vehicles have a turbo for testing purposes with a top speed of 180 in the Red VWGolf.

    You can lock/unlock doors and they work online.

    meMarker works perfectly now.

    -=[RPG]=- CrimeCity Alpha Server - No password, join and tell me what you think!!


  7. I am going to bump this real quick...

    I added a script via addaction, then player reveal this for the claiming ownership. The script works, and then lets that person lock and unlock the car which I think shows up for everyone - not sure... about to go test so I need testers!!!

    But anyways, when someone claims ownership, it only removes the action for the person that executed the script instead of it removing the action for EVERYONE so the car can only have 1 owner.

    Any ideas?

    f_claimOwnership.sqf

    _vehicle = _this select 0;
    _player = _this select 1;
    _myAction = _this select 2;
    _isLocked = locked _vehicle;
    
    _vehicle removeAction _myAction;
    _vehicle lock false;
    _player action ["getInDriver", _vehicle];
    _vehicle lock true;
    if ( Player == _player ) then { _myAction = _vehicle addAction ["Unlock", "Client\f_toggleCarLock.sqf"]; nil = [_temp, 55] execVM "Server\f_vehicleHindered.sqf"; };

    f_toggleCarLock.sqf

    //
    // Toggles the car lock
    //
    _vehicle = _this select 0;
    _player = _this select 1;
    _myAction = _this select 2;
    _isLocked = locked _vehicle;
    
    _vehicle removeAction _myAction;
    
    //if (driver _vehicle != _player) then { _player Sidechat "* Jingle Jingle *"; Sleep 0.5; };
    
    
    // Locked
    if ( _isLocked ) then
    {
    _player sideChat "Unlocked!";
    _vehicle lock false;
    _myAction = _vehicle addAction ["Lock", "Client\f_toggleCarLock.sqf"];
    }
    else
    {
    _player sideChat "Locked!";
    _vehicle lock true;
    _myAction = _vehicle addAction ["Unlock", "Client\f_toggleCarLock.sqf"];
    };


  8. This is server only execvm this script:

    _temp = "VWGolf" createVehicle _markerPosition;
    removeAllWeapons _temp; 
    nil = [_temp, 55] execVM "Server\f_vehicleHindered.sqf";
    nil = [_temp] execVM "Server\f_pointToNearestRoad.sqf";

    It points to the nearest road, but it doesnt get hindered...

    This is the main portion of the turbo script which is used with vehicle hindered except with - boost.

    _car setVelocity [ ( _xvel ) + ( (sin _dir) * _boostLevel ),
    				    ( _yvel ) + ( (cos _dir) * _boostLevel ),
    				    ( _zvel ) - ( 0.00009 )
    		];

    But the entire script should be attached to the car...

    Edit: I also tried running the script by using a trigger, on not preset. But it created 2 cars even though the trigger was only supposed to activate 1 time.

    ---------- Post added at 12:45 PM ---------- Previous post was at 11:08 AM ----------

    Solved! I need someone to connect to test if claiming ownership works properly.

    But, it seems to work perfectly.

    Created a toggle lock system, etc...

    The way I got around it was by adding an action for a script to claim ownership - that script unlocks the car, puts the person in driver seat, and locks the car - then the player has access to the lock/unlock script, and the script gets added at the claim ownership level :-)

    I had to use

    _temp setvehicleinit "removeAllWeapons this; this lock true; this addAction ['Claim Ownership', 'Client\f_claimOwnership.sqf']; player reveal this";

    processInitCommands;


  9. Should I be createVehicle-ing on the client, or the server side?

    I currently have it set on the server only, it creates the vehicle/house and positions it perfectly. But, it is not attaching the script to the car, or at least it might be on the server, but not on the player side.

    If I run the same script on client side, if another player joins, another car is created. Scripts work, but hints show up for everyone :-/

    Any ideas? If code is needed I can provide.

    ---------- Post added at 08:46 AM ---------- Previous post was at 08:43 AM ----------

    If anyone wants to look, connect to the RPG Crime City Alpha server!

    The map is [RPG] CrimeCity_Alpha_1_8 for the client side, and 2_0 for serverside...


  10. I am trying to see how my mission will be like, and if the scripting is all correct by running the dedicated server, and Arma 2 at the same time. Is there a way to do this, it seems to close Arma 2 down if the server is running.

    In OFP I could do this!!!

    Otherwise I will have no way of QAing my scripts to make sure the server side of the game-mode talks to client side properly, and vice versa.


  11. Ok, I will be adding City markers!!!

    ccSetupCivilianCity -

    ccSetupNeutralCity - Can set a few as neutral - CAN NOT TAKE OVER NEUTRAL CITY!! Neutral has no military and is allied with both Civ and Ter, therefore no enemies!

    ccSetupTerroristCity - SAME AS CIV - Can create 1 or more. If civ or ter destroys the LAST city, then civilians/terrorists can move to neutral cities to live, or can re-take the enemy cities without help from military in order to re-establish their grasp on the map.

    Im thinking you can go to a consulate to switch your "faction" and these buildings will be in neutral towns - to avoid any altercations with locals :-)

    Unsure about spawning. I may just have everyone spawn in neutral cities.


  12. setup function is almost done.

    New functions to detect nearestRoad, and to pointToNearestRoad

    Buildings spawn correctly, car dealers etc. Actions added properly if needed. Turbo gets added correctly as well if needed.

    I can set up the dealers anyway I want it. I might make it so you can surround your dealership layours, etc in another marker.. ccSurroundCarDealer - if this is detected, then it uses that as the layout for your dealership, relative to the nearest road of course. Get size of marker, x, y position, and all markers within those boundaries... hmmmmm. Base functionality before easier map porting.

    Even though placing the markers and having everything else done for you is friggin fantastic!


  13. Been working in the debug panel of my game-mode (just a place to code and debug).

    I have made things spawn at markers, based on what the marker name was, all automatic.

    I am going to do a lot of stuff this way. If you want to buy a car, you will have to go to a car lot, look at the cars, and decide which one you want to drive off of the lot!!! The game-mode will automatically respawn the car you bought when you take ownership. It will respawn in the car lot somewhere.

    Anyway, quick question to make for shorter loops and setup times. I allow x number of markers per task.

    ccSetupCar_(0-999) - This marker spawns a disposable car - top speed is 60, everyone can drive it, it will automatically respawn if it gets destroyed, or if no one drives it for 2 minutes.

    ccSetupCarDealer_(0-999) - This marker spawns a car dealership lot. There will be an array of ALL vehicles that will spawn here, and all purchasable vehicles will be respawned once someone buys them and drives it off the lot. There will be an official looking building, and an npc, as well as the text for the marker being an ICON for the car lot.

    Note: Each different type of business has their own icon.

    ATM = Green $

    Bank = Green B - all banks have an atm, an npc that will deposit or withdraw money for you, an npc to talk to you about credit cards, life insurance, etc... And of course, something where you can rob it.

    Car Dealer = ?

    Motorcycles = ?

    Boats = Blue B?

    ---------- Post added at 12:22 AM ---------- Previous post was at 12:07 AM ----------

    Alright so the skeleton of the easy map making function is done!

    I can add new marker names, and procedures for each of them to spawn whatever I want. From 1 thing to a series of things!

    I will upload a video tomorrow showing it spawning cars, and other stuff. :-)


  14. Woot, I have the map setting up itself!!

    Positions marked as follows:

    ccSetup_______ for 1 time use spawns of buildings, cars, random stuff. Buildings will have repair script attached, while cars will not - they will have the free car script (which limits the speed to 60ish) just to give everyone cars right at the start!!

    I will have to put the civilians in the game I believe, but I am having the server do as much as possible as for setting up and maintaining the game-mode.

×